Function at 0x40dd70
Capabilities:
Access peb ldr_data
Get kernel32 base address

Disassembly:
push 0xffffffffffffffff
push 0x4e4850
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x50
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov ecx, dword [esi + 0x20]
call fcn.004a94e0
lea ecx, [esp + 0x1c]
mov dword [esp + 0x18], eax
call fcn.004178f0
mov eax, dword [esi + 0x20]
xor edi, edi
push eax
mov dword [esp + 0x14], edi
lea ecx, [eax + 0x1ac]
mov edx, dword [eax + 0x1ac]
mov dword [esp + 0x30], edx
mov edx, dword [ecx + 4]
mov dword [esp + 0x34], edx
mov edx, dword [ecx + 8]
mov dword [esp + 0x38], edx
lea edx, [eax + 0x1ec]
mov ecx, dword [ecx + 0xc]
mov dword [esp + 0x3c], ecx
mov ecx, dword [edx]
mov dword [esp + 0x40], ecx
mov ecx, dword [edx + 4]
mov dword [esp + 0x44], ecx
mov ecx, dword [edx + 8]
mov dword [esp + 0x48], ecx
lea ecx, [esp + 0x50]
mov edx, dword [edx + 0xc]
mov dword [esp + 0x4c], edx
call fcn.004e2538
mov ecx, dword [esi + 0x20]
lea edx, [esp + 0x4c]
push edi
push edx
mov eax, dword [ecx]
mov dword [esp + 0x70], edi
call dword [eax + 0xe4]
mov ecx, dword [esp + 0x54]
mov ebx, dword [sym.imp.GDI32.dll_DPtoLP]
lea eax, [esp + 0x2c]
push 2
push eax
push ecx
call ebx
mov eax, dword [esp + 0x54]
lea edx, [esp + 0x3c]
push 2
push edx
push eax
call ebx
mov eax, dword [esp + 0x70]
mov dword [esp + 0x14], edi
cmp eax, edi
jne 0x40defb
mov eax, dword [esi + 0x20]
xor ebp, ebp
cmp dword [eax + 0x214], edi
jle 0x40dfc6
mov ecx, dword [eax + 0x210]
lea eax, [esp + 0x80]
lea edx, [ecx + ebp*8]
lea ecx, [esp + 0x1c]
push edx
push eax
call fcn.00417900
mov ecx, dword [esi + 0x20]
mov edx, dword [esp + 0x1e]
and edx, 0xffff
sub esp, 0x10
mov eax, dword [ecx + 0x40]
mov ecx, esp
sub esp, 0x10
mov eax, dword [eax + 0xe4]
mov ebx, dword [eax + edx*4]
mov edx, dword [esp + 0x4c]
mov eax, dword [esp + 0x50]
mov dword [ecx], edx
mov edx, dword [esp + 0x54]
mov dword [ecx + 4], eax
mov eax, dword [esp + 0x58]
mov dword [ecx + 8], edx
mov edx, dword [esp + 0x5c]
mov dword [ecx + 0xc], eax
mov eax, dword [esp + 0x60]
mov ecx, esp
mov dword [ecx], edx
mov edx, dword [esp + 0x64]
mov dword [ecx + 4], eax
mov eax, dword [esp + 0x68]
mov dword [ecx + 8], edx
mov dword [ecx + 0xc], eax
mov ecx, ebx
call fcn.00463130
mov ecx, 1
cmp word [ebx + 4], cx
jne 0x40dede
mov dword [esp + 0x10], ecx
cmp eax, edi
jne 0x40dee6
mov dword [esp + 0x14], ecx
mov eax, dword [esi + 0x20]
inc ebp
cmp ebp, dword [eax + 0x214]
jl 0x40de54
jmp 0x40dfc6
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x30]
mov dword [esp + 0x70], edi
lea eax, [edx + ecx]
mov ecx, dword [esp + 0x34]
cdq
sub eax, edx
mov ebp, eax
mov eax, dword [esp + 0x2c]
add eax, ecx
cdq
sub eax, edx
mov ebx, eax
mov eax, dword [esi + 0x20]
sar ebp, 1
mov ecx, dword [eax + 0x214]
sar ebx, 1
cmp ecx, edi
jle 0x40dfc6
mov edx, dword [eax + 0x210]
mov eax, dword [esp + 0x70]
lea ecx, [edx + eax*8]
lea edx, [esp + 0x24]
push ecx
push edx
lea ecx, [esp + 0x24]
call fcn.00417900
mov eax, dword [esi + 0x20]
mov ecx, dword [esp + 0x1e]
and ecx, 0xffff
push 0
mov eax, dword [eax + 0x40]
mov edx, dword [eax + 0xe4]
mov eax, dword [esp + 0x88]
push eax
mov eax, dword [esp + 0x80]
mov edi, dword [edx + ecx*4]
mov ecx, dword [esp + 0x88]
mov edx, dword [esp + 0x84]
push ecx
push edx
push eax
push ebp
push ebx
mov ecx, edi
call fcn.00463230
mov ecx, 1
cmp word [edi + 4], cx
jne 0x40dfa2
mov dword [esp + 0x10], ecx
test eax, eax
jne 0x40dfaa
mov dword [esp + 0x14], ecx
mov eax, dword [esi + 0x20]
mov ecx, dword [esp + 0x70]
inc ecx
mov edx, dword [eax + 0x214]
mov dword [esp + 0x70], ecx
cmp ecx, edx
jl 0x40df33
xor edi, edi
cmp dword [esp + 0x74], edi
je 0x40e101
cmp dword [esp + 0x10], edi
je 0x40e101
mov eax, dword [esi + 0x20]
xor ebp, ebp
mov dword [esp + 0x74], ebp
cmp dword [eax + 0x214], edi
jle 0x40e101
mov ecx, dword [eax + 0x210]
lea eax, [esp + 0x80]
lea edx, [ecx + ebp*8]
lea ecx, [esp + 0x1c]
push edx
push eax
call fcn.00417900
mov eax, dword [esi + 0x20]
mov ecx, dword [eax + 0x134]
mov eax, dword [eax + 0x40]
cmp ecx, edi
je 0x40e097
mov ecx, dword [esp + 0x1e]
mov edx, dword [eax + 0xe4]
and ecx, 0xffff
mov eax, dword [edx + ecx*4]
cmp dword [eax + 0x98], edi
je 0x40e084
lea ecx, [esp + 0x70]
call sub.MFC42.DLL_CString::CString
push 0xa1e6
lea ecx, [esp + 0x74]
mov byte [esp + 0x6c], 1
call sub.MFC42.DLL_CString::LoadStringA
mov eax, dword [esp + 0x70]
push edi
push 4
push eax
call sub.MFC42.DLL_AfxMessageBox
cmp eax, 6
jne 0x40e074
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x1c]
push ecx
push edx
mov ecx, esi
call fcn.0040e5e0
lea ecx, [esp + 0x70]
mov byte [esp + 0x68], 0
call fcn.004e2712
jmp 0x40e0ed
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
push eax
push ecx
mov ecx, esi
call fcn.0040e5e0
jmp 0x40e0ed
mov edx, dword [esp + 0x1e]
mov eax, dword [eax + 0xe4]
and edx, 0xffff
mov ebx, dword [eax + edx*4]
mov eax, dword [ebx + 0x58]
cmp eax, edi
je 0x40e0e7
mov ecx, dword [ebx + 0x5c]
mov edi, eax
mov edx, ecx
dec ecx
test edx, edx
je 0x40e0d2
lea ebp, [ecx + 1]
mov eax, dword [edi]
push 0
mov ecx, edi
call dword [eax]
add edi, 0x30
dec ebp
jne 0x40e0c0
mov ebp, dword [esp + 0x74]
mov eax, dword [ebx + 0x58]
push eax
call sub.MFC42.DLL_operatordelete
add esp, 4
mov dword [ebx + 0x58], 0
xor edi, edi
mov dword [ebx + 0x60], edi
mov dword [ebx + 0x5c], edi
mov eax, dword [esi + 0x20]
inc ebp
mov dword [esp + 0x74], ebp
cmp ebp, dword [eax + 0x214]
jl 0x40dfef
cmp dword [esp + 0x18], edi
je 0x40e10f
mov ecx, dword [esi + 0x20]
call fcn.004a9520
lea ecx, [esp + 0x4c]
mov dword [esp + 0x68], 0xffffffff
call sub.MFC42.DLL_CClientDC::CClientDC
mov ecx, dword [esp + 0x60]
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x5c
ret 0x18