Function at 0x405c40
Capabilities:
Inspect load icon resource

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4bba63
mov eax, dword fs:[0]
push eax
sub esp, 0x49c
mov eax, dword [0x4fb068]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x68], ebx
mov ecx, dword [ebp + 0x14]
mov eax, dword [ebp + 8]
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0x60], ecx
xor ecx, ecx
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], cx
mov dword [ebp - 4], ecx
mov ecx, dword [eax + 0x10]
test ecx, ecx
je 0x405cbf
lea edx, [ebp - 0x28]
cmp edx, eax
je 0x405e0d
cmp dword [eax + 0x14], 8
jb 0x405cb0
mov eax, dword [eax]
push ecx
push eax
lea ecx, [ebp - 0x28]
call fcn.00401ed0
jmp 0x405d3b
mov edx, 0x753e
lea ecx, [ebp - 0x40]
call fcn.00407440
mov edx, eax
mov byte [ebp - 4], 1
cmp dword [edx + 0x14], 8
jb 0x405cda
mov edx, dword [edx]
mov ecx, edx
mov dword [ebp - 0x48], 0
xor eax, eax
mov dword [ebp - 0x44], 7
mov word [ebp - 0x58], ax
lea edi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x405cf3
sub ecx, edi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x58]
call fcn.00401ed0
lea eax, [ebp - 0x58]
mov byte [ebp - 4], 2
push eax
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 0x60]
lea eax, [ebx + 0xf8]
push eax
call fcn.00405590
lea ecx, [ebp - 0x58]
call fcn.00401e60
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 0
call fcn.00401e60
cmp dword [ebp - 0x18], 0
je 0x405e0d
mov eax, dword [ebx + 0xac]
push str.CheckDiskConnected
push dword [eax + 8]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x405db0
cmp dword [ebp - 0x14], 8
lea ecx, [ebp - 0x28]
cmovae ecx, dword [ebp - 0x28]
push ecx
call eax
add esp, 4
test eax, eax
jne 0x405db0
mov edx, 0x7552
lea ecx, [ebp - 0x40]
call fcn.00407440
cmp dword [ebp - 0x14], 8
lea ecx, [ebp - 0x28]
cmovae ecx, dword [ebp - 0x28]
cmp dword [eax + 0x14], 8
jb 0x405d92
mov eax, dword [eax]
push 0xfa0
push ecx
push eax
lea ecx, [ebx + 0x18c]
call fcn.0040aee0
lea ecx, [ebp - 0x40]
call fcn.00401e60
mov bl, 1
jmp 0x405e0f
mov ecx, dword [ebx + 0xac]
push esi
call fcn.00401c60
cmp dword [esi + 0x10], 0
je 0x405e37
test eax, eax
jne 0x405e37
mov ecx, dword [ebx + 0xac]
push esi
call fcn.00401d40
test eax, eax
je 0x405e37
mov edx, 0x7540
lea ecx, [ebp - 0x40]
call fcn.00407440
cmp dword [esi + 0x14], 8
jb 0x405deb
mov esi, dword [esi]
cmp dword [eax + 0x14], 8
jb 0x405df3
mov eax, dword [eax]
push 0xfa0
push esi
push eax
lea ecx, [ebx + 0x18c]
call fcn.0040aee0
lea ecx, [ebp - 0x40]
call fcn.00401e60
xor bl, bl
lea ecx, [ebp - 0x28]
call fcn.00401e60
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00496c8f
mov esp, ebp
pop ebp
ret 0x10
push ecx
mov ecx, ebx
call fcn.00405170
test al, al
je 0x405e0d
mov edi, dword [ebx + 0xa4]
mov eax, 0xfec18e1
mov esi, dword [ebx + 0xa0]
mov ecx, edi
sub ecx, esi
mov dword [ebp - 0x5c], esi
imul ecx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, 0xa
jb 0x406039
xor eax, eax
mov dword [ebp - 0x9c], 0
xor edx, edx
mov dword [ebp - 0x8c], 0
mov dword [ebp - 0x88], 0
mov dword [ebp - 0x84], 0
mov dword [ebp - 0xa0], vtable.RC::RCCDSelectImageDlg.0
mov dword [ebp - 0x78], 0
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x70], edx
mov dword [ebp - 0x6c], eax
mov dword [ebp - 0x80], eax
mov dword [ebp - 0x7c], eax
mov byte [ebp - 4], 3
cmp esi, edi
je 0x405f2a
mov ebx, edi
nop word [eax + eax]
lea edi, [ebp - 0x4a8]
mov ecx, 0x101
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
cmp edx, eax
je 0x405eff
mov edi, eax
lea esi, [ebp - 0x4a8]
mov ecx, 0x101
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
mov eax, dword [ebp - 0x74]
add eax, 0x405
mov dword [ebp - 0x74], eax
jmp 0x405f12
lea ecx, [ebp - 0x4a8]
push ecx
push eax
lea ecx, [ebp - 0x78]
call fcn.00408860
mov eax, dword [ebp - 0x74]
mov esi, dword [ebp - 0x5c]
add esi, 0x405
mov dword [ebp - 0x5c], esi
cmp esi, ebx
je 0x405f27
mov edx, dword [ebp - 0x70]
jmp 0x405ed0
mov ebx, dword [ebp - 0x68]
push 0x65
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.USER32.dll_LoadIconW]
mov dword [ebp - 0x80], eax
mov dword [ebp - 0x7c], eax
mov eax, dword [ebp - 0x8c]
test eax, eax
jne 0x405f72
call fcn.00496b39
mov dword [ebp - 0x8c], eax
test eax, eax
jne 0x405f72
push 0xe
call dword [sym.imp.KERNEL32.dll_SetLastError]
lea ecx, [ebp - 0xa0]
call fcn.0040e660
jmp 0x405e0d
push 0
push 0
push eax
call fcn.00496c3b
lea eax, [ebp - 0xa0]
mov dword [ebp - 0x98], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push 0x4fbcec
mov dword [ebp - 0x94], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [0x4fbd04]
mov dword [ebp - 0x90], eax
lea eax, [ebp - 0x98]
push 0x4fbcec
mov dword [0x4fbd04], eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push 0
push 0x408590
push dword [ebp - 0x60]
push 0x1f5
push dword [0x4fd264]
call dword [sym.imp.USER32.dll_DialogBoxParamW]
cmp eax, 1
jne 0x406088
mov ecx, dword [ebx + 0xa4]
mov eax, 0xfec18e1
mov edi, dword [ebx + 0xa0]
sub ecx, edi
imul ecx
mov ecx, dword [ebp - 0x6c]
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp ecx, eax
jae 0x406088
imul esi, ecx, 0x405
mov al, byte [esi + edi + 4]
mov byte [ebp + 0x10], al
mov eax, dword [esi + edi]
test eax, eax
js 0x40604e
push eax
mov ecx, ebx
call fcn.004062f0
test al, al
je 0x40604e
lea ecx, [ebp - 0xa0]
mov byte [ebp - 4], 0
call fcn.0040e660
push dword [ebp + 0x10]
lea eax, [ebp - 0x28]
mov ecx, ebx
push eax
call fcn.00406210
mov bl, al
jmp 0x405e0f
mov edx, 0x7540
lea ecx, [ebp - 0x40]
call fcn.00407440
mov edx, eax
cmp dword [edx + 0x14], 8
jb 0x406065
mov edx, dword [edx]
push 0xfa0
lea eax, [esi + 5]
add eax, dword [ebx + 0xa0]
lea ecx, [ebx + 0x18c]
push eax
push edx
call fcn.0040aee0
lea ecx, [ebp - 0x40]
call fcn.00401e60
lea ecx, [ebp - 0xa0]
call fcn.0040e660
jmp 0x405e0d