Function at 0x40c180
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x44e813
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x8c
push ebx
mov ebx, dword [esp + 0xac]
push ebp
push esi
mov esi, dword [esp + 0xa8]
push edi
mov dword [esp + 0x18], 0
test ebx, 0x10000000
je 0x40c1ca
xor eax, eax
cmp dword [esi + 0x18], eax
setne al
inc eax
mov dword [esp + 0x18], eax
mov edi, dword [esp + 0xc4]
test ebx, 0x70000000
setne cl
shr ebx, 0x1b
and bl, 1
mov byte [esi + 0x51], cl
mov dword [esp + 0x50], edi
mov byte [esp + 0x2e], bl
je 0x40c1f6
push edi
call fcn.0043d0fd
add esp, 4
cmp edi, 1
jl 0x40c1ff
test bl, bl
je 0x40c20a
mov dword [esp + 0xc4], 1
xor edi, edi
push edi
call dword [sym.imp.USER32.dll_GetDC]
mov ebp, eax
mov dword [esp + 0x14], ebp
mov dword [esp + 0xa4], edi
cmp byte [esp + 0xb0], 0
mov dword [esp + 0x1c], edi
je 0x40c23f
cmp dword [esi + 0x18], edi
jne 0x40c32e
mov byte [esp + 0xb0], 0
cmp dword [esp + 0x18], edi
jne 0x40c32e
mov al, byte [esi + 0x53]
cmp al, 0xff
jne 0x40c282
lea eax, [esi + 0x54]
mov edi, 1
push edi
lea edx, [eax + 3]
push edx
push edi
push eax
push edi
lea ecx, [eax + 1]
push ecx
push edi
add eax, 2
push eax
lea edx, [esi + 0x10]
push 4
push edx
call fcn.0040190f
add esp, 0x28
mov dword [esi + 0x40], edi
mov dword [esi + 0x3c], edi
jmp 0x40c32e
mov edi, dword [esi + 0x54]
mov ebx, dword [sym.imp.GDI32.dll_DeleteObject]
cmp al, 1
jne 0x40c301
lea eax, [esp + 0x58]
push eax
push edi
call dword [sym.imp.USER32.dll_GetIconInfo]
test eax, eax
jne 0x40c2bd
mov dword [esp + 0xa4], 0xffffffff
push ebp
push 0
call dword [sym.imp.USER32.dll_ReleaseDC]
mov eax, 0x23d
jmp 0x40ce01
lea ecx, [esi + 0x20]
push ecx
lea edx, [esi + 0x50]
push edx
mov edx, dword [esp + 0x6c]
lea eax, [esi + 0x40]
push eax
lea ecx, [esi + 0x3c]
push ecx
push ebp
push edx
call fcn.0040bf32
mov dword [esp + 0x34], eax
lea eax, [esp + 0x70]
push eax
push edi
call fcn.0040bfc6
mov ecx, dword [esp + 0x88]
add esp, 0x20
push ecx
mov edi, eax
call ebx
mov edx, dword [esp + 0x64]
push edx
call ebx
test edi, edi
je 0x40c29f
lea eax, [esi + 0x10]
push eax
lea ecx, [esi + 0x50]
push ecx
lea edx, [esi + 0x40]
push edx
lea eax, [esi + 0x3c]
push eax
push ebp
push edi
call fcn.0040bf32
add esp, 0x18
cmp byte [esi + 0x53], 1
jne 0x40c324
push edi
call ebx
cmp dword [esi + 0x18], 0
je 0x40c29f
mov ecx, dword [esp + 0xb8]
mov edi, dword [esp + 0xb4]
mov edx, dword [esp + 0xc0]
push ecx
push edi
push edx
call fcn.0040bdf4
mov ebx, eax
add esp, 0xc
test ebx, ebx
je 0x40c36f
mov dword [esp + 0xa4], 0xffffffff
push ebp
push 0
call dword [sym.imp.USER32.dll_ReleaseDC]
mov eax, ebx
jmp 0x40ce01
mov eax, dword [edi]
mov ecx, dword [edi + 4]
mov ebp, dword [edi + 8]
mov ebx, dword [edi + 0xc]
sub ebp, eax
sub ebx, ecx
cmp dword [esp + 0x18], 0
mov dword [esp + 0x84], eax
mov dword [esp + 0x98], ecx
mov byte [esp + 0x13], 0
mov byte [esp + 0x2f], 0
jne 0x40c3bb
mov ecx, dword [esi + 0x3c]
cmp ebp, ecx
jl 0x40cde4
mov eax, dword [esi + 0x40]
cmp ebx, eax
jl 0x40cde4
cmp ebp, ecx
jne 0x40c3c0
cmp ebx, eax
jne 0x40c3c0
mov byte [esp + 0x13], 1
mov eax, dword [esp + 0xb8]
and eax, 0x300
mov dword [esp + 0x34], eax
jne 0x40c3e1
call fcn.0042fa35
cmp ebp, eax
jne 0x40c3e1
mov byte [esp + 0x2f], 1
inc ebp
mov eax, dword [esi + 0x34]
test eax, eax
je 0x40c3f2
cmp ebp, dword [esi + 0x44]
jne 0x40c3f2
cmp ebx, dword [esi + 0x48]
je 0x40c435
test dword [esp + 0xb8], 0x200
je 0x40c41d
test eax, eax
jne 0x40c505
mov eax, dword [esp + 0xc0]
push eax
lea ecx, [esi + 0x30]
mov byte [esi + 0x52], 1
call fcn.00435d46
jmp 0x40c42f
push ebx
push ebp
lea ecx, [esi + 0x30]
call fcn.00435c8c
test al, al
je 0x40c593
mov dword [esi + 0x44], ebp
mov dword [esi + 0x48], ebx
cmp dword [esp + 0x34], 0
jne 0x40c487
mov edx, dword [edi + 4]
mov ecx, dword [edi]
mov eax, dword [esi + 0x30]
push 0xcc0020
push edx
mov edx, dword [esp + 0x1c]
push ecx
push edx
push ebx
push ebp
push 0
push 0
push eax
call dword [sym.imp.GDI32.dll_BitBlt]
test eax, eax
jne 0x40c62e
mov dword [esp + 0xa4], 0xffffffff
mov eax, dword [esp + 0x14]
push eax
push 0
call dword [sym.imp.USER32.dll_ReleaseDC]
mov eax, 0x23d
jmp 0x40ce01
test dword [esp + 0xb8], 0x100
je 0x40c62e
cmp dword [0x461ccc], 0
jne 0x40c4bc
push 0
push 0x461ccc
push str.PrintWindow
push 0x453198
push 1
call fcn.0042ff9a
add esp, 0x14
mov edx, dword [esp + 0xc0]
lea ecx, [esp + 0x88]
push ecx
push edx
call dword [sym.imp.USER32.dll_GetWindowRect]
push 0x10
lea eax, [esp + 0x8c]
push edi
push eax
call sub.msvcrt.dll_memcmp
add esp, 0xc
test eax, eax
jne 0x40c527
mov eax, dword [esi + 0x30]
mov ecx, dword [esp + 0xc0]
push 0
push eax
push ecx
call dword [0x461ccc]
test eax, eax
jne 0x40c62e
mov dword [esp + 0xa4], 0xffffffff
mov edx, dword [esp + 0x14]
push edx
push 0
call dword [sym.imp.USER32.dll_ReleaseDC]
mov eax, 0x23d
jmp 0x40ce01
xor eax, eax
mov dword [esp + 0x78], eax
mov dword [esp + 0x7c], eax
mov dword [esp + 0x80], eax
mov byte [esp + 0xa4], 1
mov eax, dword [esp + 0x94]
sub eax, dword [esp + 0x8c]
mov ecx, dword [esp + 0x90]
sub ecx, dword [esp + 0x88]
push eax
push ecx
lea ecx, [esp + 0x80]
call fcn.00435c8c
mov edx, dword [esp + 0x78]
mov eax, dword [esp + 0xc0]
push 0
push edx
push eax
call dword [0x461ccc]
test eax, eax
jne 0x40c5b5
mov byte [esp + 0xa4], al
lea ecx, [esp + 0x78]
call fcn.00435d15
mov dword [esp + 0xa4], 0xffffffff
mov ecx, dword [esp + 0x14]
push ecx
push 0
call dword [sym.imp.USER32.dll_ReleaseDC]
mov eax, 0x23d
jmp 0x40ce01
mov edx, dword [edi + 4]
sub edx, dword [esp + 0x8c]
mov ecx, dword [edi]
sub ecx, dword [esp + 0x88]
mov eax, dword [esi + 0x30]
push 0xcc0020
push edx
mov edx, dword [esp + 0x80]
push ecx
push edx
push ebx
push ebp
push 0
push 0
push eax
call dword [sym.imp.GDI32.dll_BitBlt]
test eax, eax
jne 0x40c61d
mov byte [esp + 0xa4], al
lea ecx, [esp + 0x78]
call fcn.00435d15
mov dword [esp + 0xa4], 0xffffffff
mov eax, dword [esp + 0x14]
push eax
push 0
call dword [sym.imp.USER32.dll_ReleaseDC]
mov eax, 0x23d
jmp 0x40ce01
mov byte [esp + 0xa4], 0
lea ecx, [esp + 0x78]
call fcn.00435d15
mov eax, dword [esi + 0x30]
mov ecx, dword [esi + 0x34]
push esi
lea edx, [esp + 0x16]
push edx
lea edx, [esp + 0x3c]
push edx
lea edx, [esp + 0x3c]
push edx
push eax
push ecx
call fcn.0040bf32
add esp, 0x18
test eax, eax
je 0x40c465
cmp dword [esp + 0x18], 1
mov ebx, dword [esp + 0x34]
jne 0x40c67b
push esi
lea ecx, [esi + 0x10]
call fcn.0042ace5
mov ecx, dword [esp + 0x30]
mov dl, byte [esp + 0x12]
mov dword [esi + 0x3c], ecx
mov dword [esi + 0x40], ebx
mov byte [esi + 0x50], dl
mov eax, dword [esi]
mov ebp, dword [esi + 0x3c]
mov edi, dword [esi + 0x10]
mov dword [esp + 0x3c], eax
mov eax, dword [esi + 0x40]
mov dword [esp + 0x4c], eax
mov dword [esp + 0x40], ebp
imul ebp, eax
mov eax, dword [esp + 0x30]
imul eax, ebx
mov ebx, dword [esp + 0x1c]
mov dword [esp + 0x44], eax
xor eax, eax
mov dword [esp + 0x48], edi
mov dword [esp + 0x38], ebp
cmp ebx, eax
je 0x40c734
cmp ebp, eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
jle 0x40c6f6
mov edx, ebx
mov ecx, edi
sub edx, edi
mov dword [esp + 0x20], ebp
lea esp, [esp]
cmp dword [edx + ecx], 0
jne 0x40c6ec
mov eax, dword [ecx]
inc dword [esp + 0x24]
and eax, 0xff000000
cmp eax, 0xff000000
jne 0x40c6ec
inc dword [esp + 0x28]
add ecx, 4
sub dword [esp + 0x20], 1
jne 0x40c6d0
mov eax, dword [esp + 0x24]
cdq
sub eax, edx
sar eax, 1
cmp dword [esp + 0x28], eax
jl 0x40c734
test ebp, ebp
jle 0x40c734
mov ecx, edi
mov eax, ebx
sub ecx, ebx
mov edx, ebp
mov ebx, dword [ecx + eax]
and ebx, 0xff000000
cmp ebx, 0xff000000
je 0x40c728
mov dword [eax], 1
add eax, 4
sub edx, 1
jne 0x40c711
mov ebx, dword [esp + 0x1c]
cmp byte [esi + 0x50], 0
jne 0x40c749
cmp byte [esp + 0x12], 0
mov dword [esp + 0x24], 0xffffff
je 0x40c751
mov dword [esp + 0x24], 0xf8f8f8
cmp dword [esp + 0x3c], 0
je 0x40c76f
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x44]
mov eax, dword [esp + 0x3c]
push ecx
push edx
push eax
call fcn.0040c160
add esp, 0xc
cmp byte [esp + 0xb0], 0
jne 0x40c943
mov ecx, dword [esp + 0x24]
push ecx
push ebp
push edi
call fcn.0040c160
add esp, 0xc
mov dword [esp + 0x1c], 0xffffffff
test ebx, ebx
je 0x40c7b8
test ebp, ebp
jle 0x40c7b8
mov ecx, ebx
mov eax, edi
sub ecx, edi
mov edx, ebp
cmp dword [eax + ecx], 0
je 0x40c7b0
mov dword [eax], 0xffffffff
add eax, 4
sub edx, 1
jne 0x40c7a4
test byte [esp + 0xb8], 4
je 0x40c823
mov eax, dword [edi]
movzx edx, byte [edi + 1]
mov dword [esp + 0x1c], eax
movzx ecx, al
movzx eax, byte [edi + 2]
mov dword [esp + 0x54], eax
xor eax, eax
mov dword [esp + 0x34], edx
test ebp, ebp
jle 0x40c823
movzx edx, byte [edi + eax*4]
mov ebx, ecx
sub ebx, edx
add ebx, 8
cmp ebx, 0x10
ja 0x40c81e
movzx edx, byte [edi + eax*4 + 1]
mov ebx, dword [esp + 0x34]
sub ebx, edx
add ebx, 8
cmp ebx, 0x10
ja 0x40c81e
movzx edx, byte [edi + eax*4 + 2]
mov ebx, dword [esp + 0x54]
sub ebx, edx
add ebx, 8
cmp ebx, 0x10
ja 0x40c81e
mov edx, dword [esp + 0x1c]
mov dword [edi + eax*4], edx
inc eax
cmp eax, ebp
jl 0x40c7e1
mov eax, dword [esp + 0x1c]
mov dword [esi + 0x4c], eax
cmp dword [esp + 0x18], 1
je 0x40cd9a
mov eax, dword [edi]
mov ebx, dword [esp + 0x40]
mov edx, dword [esp + 0x4c]
xor ebp, ebp
cmp byte [esp + 0x13], 0
mov dword [esp + 0x58], ebp
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], ebp
mov dword [esp + 0x64], eax
mov dword [esp + 0x68], ebp
mov dword [esp + 0x6c], eax
mov dword [esp + 0x70], ebp
mov dword [esp + 0x74], eax
mov dword [esp + 0x28], ebp
mov dword [esp + 0x24], ebx
mov dword [esp + 0x20], edx
jne 0x40ca0e
mov edx, dword [esp + 0x38]
xor ecx, ecx
test edx, edx
jle 0x40c890
mov eax, dword [esp + 0x1c]
cmp dword [edi + ecx*4], eax
jne 0x40c890
inc ecx
cmp ecx, edx
jl 0x40c886
cmp ecx, edx
je 0x40cde4
mov eax, ecx
test ecx, ecx
je 0x40c94f
mov edx, dword [edi + ecx*4]
mov ebp, dword [esp + 0x38]
cmp ecx, ebp
jge 0x40c976
mov esi, dword [esi + 0x3c]
mov dword [esp + 0x5c], edx
mov eax, ecx
cdq
idiv esi
mov ebx, dword [esp + 0x40]
mov dword [esp + 0x34], ecx
inc ecx
mov dword [esp + 0x18], esi
mov ebp, eax
imul ebp, dword [esp + 0x30]
add ebp, edx
sub ebx, edx
mov edx, dword [esp + 0x4c]
sub edx, eax
mov dword [esp + 0x20], edx
mov edx, dword [esp + 0x38]
cmp ecx, edx
mov dword [esp + 0x58], ebp
mov dword [esp + 0x24], ebx
jge 0x40c908
nop
mov eax, dword [edi + ecx*4]
cmp eax, dword [esp + 0x5c]
je 0x40c903
cmp eax, dword [esp + 0x1c]
jne 0x40c9ae
inc ecx
cmp ecx, edx
jl 0x40c8f0
mov ecx, dword [esp + 0x34]
lea eax, [edx - 1]
cmp eax, ecx
jle 0x40c921
mov edx, dword [esp + 0x1c]
cmp dword [edi + eax*4], edx
jne 0x40c921
dec eax
cmp eax, ecx
jg 0x40c917
mov ecx, dword [edi + eax*4]
cdq
idiv esi
mov dword [esp + 0x28], 2
mov dword [esp + 0x64], ecx
imul eax, dword [esp + 0x30]
add eax, edx
mov dword [esp + 0x60], eax
jmp 0x40ca0e
mov edx, dword [esi + 0x4c]
mov dword [esp + 0x1c], edx
jmp 0x40c82a
mov ecx, 1
cmp edx, ecx
jle 0x40c976
mov ebx, dword [esp + 0x5c]
mov ebp, edx
mov edi, edi
mov edx, dword [edi + ecx*4]
cmp edx, ebx
je 0x40c971
cmp edx, dword [esp + 0x1c]
jne 0x40c8a9
inc ecx
cmp ecx, ebp
jl 0x40c960
mov edx, dword [edi + eax*4]
mov esi, dword [esi + 0x3c]
mov dword [esp + 0x5c], edx
cdq
idiv esi
mov ebx, dword [esp + 0x40]
mov ecx, dword [esp + 0x4c]
mov dword [esp + 0x28], 1
mov ebp, eax
imul ebp, dword [esp + 0x30]
add ebp, edx
sub ebx, edx
sub ecx, eax
mov dword [esp + 0x58], ebp
mov dword [esp + 0x24], ebx
mov dword [esp + 0x20], ecx
jmp 0x40ca0e
cmp ecx, edx
jge 0x40c908
mov dword [esp + 0x64], eax
mov eax, ecx
cdq
idiv dword [esp + 0x18]
mov esi, 2
mov dword [esp + 0x28], esi
imul eax, dword [esp + 0x30]
add eax, edx
mov dword [esp + 0x60], eax
mov ebp, dword [esp + 0x38]
inc ecx
cmp ecx, ebp
jge 0x40ca0a
mov edi, edi
mov edx, dword [edi + ecx*4]
xor eax, eax
test esi, esi
jle 0x40c9fb
lea esp, [esp]
cmp edx, dword [esp + eax*8 + 0x5c]
je 0x40c9fb
inc eax
cmp eax, esi
jl 0x40c9f0
cmp eax, esi
jne 0x40ca05
cmp edx, dword [esp + 0x1c]
jne 0x40ca2b
inc ecx
cmp ecx, ebp
jl 0x40c9e0
mov ebp, dword [esp + 0x58]
cmp byte [esp + 0x2f], 0
je 0x40ca1a
inc ebx
mov dword [esp + 0x24], ebx
cmp byte [esp + 0x13], 0
je 0x40ca51
mov dword [esp + 0x44], 0
jmp 0x40ca68
cmp ecx, ebp
jge 0x40ca0a
mov dword [esp + esi*8 + 0x5c], edx
mov eax, ecx
cdq
idiv dword [esp + 0x18]
inc dword [esp + 0x28]
inc esi
imul eax, dword [esp + 0x30]
add eax, edx
mov dword [esp + esi*8 + 0x50], eax
cmp esi, 4
jb 0x40c9d5
jmp 0x40ca0a
mov eax, dword [esp + 0x20]
dec eax
imul eax, dword [esp + 0x30]
mov ecx, 1
sub ecx, eax
sub ecx, ebx
add dword [esp + 0x44], ecx
mov esi, dword [esp + 0xbc]
xor ebx, ebx
xor eax, eax
mov byte [esp + 0x12], 0
mov dword [esp + 0x18], ebx
cmp byte [esp + 0x13], bl
jne 0x40cb75
mov ebx, ebp
mov dword [esp + 0x18], ebp
cmp ebx, dword [esp + 0x44]
jge 0x40cc70
mov eax, dword [esp + 0x3c]
movzx edx, byte [esp + 0x5c]
movzx ecx, byte [eax + ebx*4]
sub ecx, edx
lea edi, [esi + esi]
add ecx, esi
cmp ecx, edi
ja 0x40cd69
mov edx, dword [esp + 0x5c]
shr edx, 8
movzx ecx, dl
movzx edx, byte [eax + ebx*4 + 1]
sub edx, ecx
add edx, esi
cmp edx, edi
ja 0x40cd69
mov ecx, dword [esp + 0x5c]
movzx eax, byte [eax + ebx*4 + 2]
shr ecx, 0x10
movzx edx, cl
sub eax, edx
add eax, esi
cmp eax, edi
ja 0x40cd69
mov ecx, dword [esp + 0x30]
mov eax, ebx
cdq
idiv ecx
sub ecx, edx
cmp dword [esp + 0x24], ecx
jg 0x40cd69
mov eax, ebx
mov ecx, 1
sub eax, ebp
cmp dword [esp + 0x28], ecx
mov dword [esp + 0x20], ecx
jle 0x40cb75
lea ecx, [esp + 0x66]
mov edx, dword [ecx - 6]
mov ebx, dword [esp + 0x3c]
add edx, eax
movzx ebp, byte [ebx + edx*4]
lea edx, [ebx + edx*4]
movzx ebx, byte [ecx - 2]
sub ebp, ebx
add ebp, esi
cmp ebp, edi
ja 0x40cd61
movzx ebx, byte [edx + 1]
movzx ebp, byte [ecx - 1]
sub ebx, ebp
add ebx, esi
cmp ebx, edi
ja 0x40cd61
movzx edx, byte [edx + 2]
movzx ebx, byte [ecx]
sub edx, ebx
add edx, esi
cmp edx, edi
ja 0x40cd61
mov edx, dword [esp + 0x20]
inc edx
add ecx, 8
cmp edx, dword [esp + 0x28]
mov dword [esp + 0x20], edx
jl 0x40cb14
mov ebx, dword [esp + 0x18]
mov ebp, dword [esp + 0x58]
xor ecx, ecx
cmp dword [esp + 0x38], ecx
mov dword [esp + 0x20], ecx
jle 0x40cc63
mov edx, ebx
sub edx, ebp
mov dword [esp + 0x34], edx
add edx, edx
add edx, edx
lea edi, [esi + esi]
mov dword [esp + 0x54], edx
jmp 0x40cba0
mov edx, dword [esp + 0x3c]
mov ebx, dword [esp + 0x48]
movzx edx, byte [edx + eax*4]
movzx ebx, byte [ebx + ecx*4]
sub edx, ebx
add edx, esi
cmp edx, edi
ja 0x40cbec
mov edx, dword [esp + 0x48]
mov ebx, dword [esp + 0x3c]
movzx ebx, byte [ebx + eax*4 + 1]
movzx edx, byte [edx + ecx*4 + 1]
sub ebx, edx
add ebx, esi
cmp ebx, edi
ja 0x40cbec
mov edx, dword [esp + 0x3c]
mov ebx, dword [esp + 0x48]
movzx edx, byte [edx + eax*4 + 2]
movzx ebx, byte [ebx + ecx*4 + 2]
sub edx, ebx
add edx, esi
cmp edx, edi
jbe 0x40cbf9
mov edx, dword [esp + 0x1c]
mov ebx, dword [esp + 0x48]
cmp dword [ebx + ecx*4], edx
jne 0x40cc50
mov edx, dword [esp + 0x20]
inc edx
cmp edx, dword [esp + 0x40]
mov byte [esp + 0x12], 1
mov dword [esp + 0x20], edx
jge 0x40cc10
inc eax
jmp 0x40cc31
mov edx, dword [esp + 0x30]
lea eax, [edx*4]
add dword [esp + 0x54], eax
mov eax, dword [esp + 0x34]
add eax, edx
mov dword [esp + 0x20], 0
mov dword [esp + 0x34], eax
inc ecx
cmp ecx, dword [esp + 0x38]
jl 0x40cba0
mov ebx, dword [esp + 0x18]
sub dword [esp + 0xc4], 1
jne 0x40cd69
jmp 0x40cc7e
mov ebx, dword [esp + 0x18]
inc ebx
mov byte [esp + 0x12], 0
mov dword [esp + 0x18], ebx
jmp 0x40ca8c
cmp byte [esp + 0x12], 0
je 0x40cd69
jmp 0x40cc40
cmp dword [esp + 0xc4], 0
jne 0x40cd73
mov eax, ebx
sub eax, ebp
cdq
idiv dword [esp + 0x30]
mov ecx, dword [esp + 0x84]
mov edi, dword [esp + 0x40]
add ecx, edx
mov edx, dword [esp + 0xb4]
mov dword [edx], ecx
add ecx, edi
mov dword [edx + 8], ecx
mov ecx, dword [esp + 0x98]
add eax, ecx
mov ecx, dword [esp + 0x4c]
mov dword [edx + 4], eax
add eax, ecx
cmp byte [esp + 0x2e], 0
mov dword [edx + 0xc], eax
je 0x40cdc8
mov edi, dword [esp + 0x50]
cmp dword [edi], 0
jne 0x40cce5
push edi
push 1
call dword [sym.imp.OLEAUT32.dll_SafeArrayAllocData]
test eax, eax
jne 0x40c465
mov edx, dword [edi]
mov dword [edx + 4], 0x10
mov eax, edi
mov eax, dword [eax]
mov edi, dword [eax + 0x10]
lea edx, [esp + 0x78]
push edx
lea ecx, [edi + 1]
push eax
mov dword [esp + 0x80], ecx
mov dword [esp + 0x84], 0
call dword [sym.imp.OLEAUT32.dll_SafeArrayAllocDescriptorEx]
test eax, eax
jne 0x40c593
mov eax, dword [esp + 0x50]
mov ecx, dword [eax]
mov eax, dword [esp + 0xb4]
mov edx, dword [eax]
shl edi, 4
add edi, dword [ecx + 0xc]
mov dword [edi], edx
mov ecx, dword [eax + 4]
mov dword [edi + 4], ecx
mov edx, dword [eax + 8]
mov dword [edi + 8], edx
mov eax, dword [eax + 0xc]
mov dword [edi + 0xc], eax
cmp dword [0x461b50], 0
je 0x40cd4c
call fcn.004206e0
inc ebx
mov dword [esp + 0xc4], 1
mov dword [esp + 0x18], ebx
jmp 0x40ca8c
mov ebp, dword [esp + 0x58]
mov ebx, dword [esp + 0x18]
inc ebx
mov dword [esp + 0x18], ebx
jmp 0x40ca8c
cmp byte [esp + 0x2e], 0
je 0x40cdb6
mov ecx, dword [esp + 0x50]
mov eax, dword [ecx]
test eax, eax
je 0x40cdb6
mov edx, dword [eax + 0xc]
mov eax, dword [esp + 0xb4]
push 0x10
push edx
push eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
mov dword [esp + 0xa4], 0xffffffff
mov ecx, dword [esp + 0x14]
push ecx
push 0
call dword [sym.imp.USER32.dll_ReleaseDC]
xor eax, eax
jmp 0x40ce01
mov dword [esp + 0xa4], 0xffffffff
mov edx, dword [esp + 0x14]
push edx
jmp 0x40cdf4
mov dword [esp + 0xa4], 0xffffffff
mov edx, dword [esp + 0x14]
push edx
push 0
call dword [sym.imp.USER32.dll_ReleaseDC]
xor eax, eax
jmp 0x40ce01
mov dword [esp + 0xa4], 0xffffffff
mov eax, dword [esp + 0x14]
push eax
push 0
call dword [sym.imp.USER32.dll_ReleaseDC]
mov eax, 1
mov ecx, dword [esp + 0x9c]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x98
ret