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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x5c
mov eax, dword [esp + 0x8c]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp], 0
mov dword [esp + 4], eax
call fcn.00403b70
mov ebx, eax
lea eax, [eax + 1]
mov dword [esp + 0x38], eax
mov esi, eax
mov eax, dword [esp + 0x88]
test eax, eax
je 0x406af4
mov eax, dword [esp + 0x88]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ebp, eax
mov dword [esp + 0x30], eax
call eax
sub esp, 4
mov edi, eax
add esi, eax
mov dword [esp + 0x2c], eax
mov dword [esp], 0x41c810
call ebp
sub esp, 4
test edi, edi
mov ebp, eax
setne dl
test ebx, ebx
mov dword [esp + 0x4c], eax
mov ecx, ebp
setg al
add ecx, esi
and dl, al
mov byte [esp + 0x4b], dl
cmovne esi, ecx
mov edx, dword [esp + 0x90]
lea eax, [esi + esi]
mov dword [esp + 0x3c], eax
add eax, 0x1e
test edx, edx
je 0x4066c0
mov eax, dword [esp + 0x90]
add eax, 0x1c
mov dword [esp], eax
call dword [esp + 0x30]
sub esp, 4
lea edx, [eax + eax + 2]
mov ecx, dword [esp + 0x3c]
mov eax, ecx
lea ecx, [edx + ecx + 0x24]
add eax, 0x1e
test edx, edx
cmovne eax, ecx
lea esi, [esi]
mov ebp, dword [esp + 0x94]
add eax, 3
and eax, 0xfffffffc
mov dword [esp + 0x34], eax
test ebp, ebp
jle 0x406b55
mov ebp, dword [esp + 0x98]
xor ebx, ebx
xor esi, esi
mov eax, dword [ebp]
mov edi, 0x1a
mov eax, dword [eax]
test eax, eax
je 0x406700
mov dword [esp], eax
call dword [esp + 0x30]
lea edi, [eax + eax + 0x1a]
sub esp, 4
mov eax, dword [ebp + 8]
test eax, eax
je 0x406ac0
mov dword [esp], eax
call dword [esp + 0x30]
lea eax, [edi + eax*2 + 2]
sub esp, 4
add eax, 5
add ebx, 1
add ebp, 0x18
and eax, 0xfffffffc
add esi, eax
cmp ebx, dword [esp + 0x94]
jne 0x4066e4
mov eax, dword [esp + 0x34]
lea eax, [esi + eax + 4]
mov dword [esp], eax
call sub.msvcrt.dll_malloc
test eax, eax
mov dword [esp + 0x44], eax
je 0x406b80
add eax, 3
mov edx, 0xffffffff
mov edi, dword [esp + 0x2c]
shr eax, 2
xor ebx, ebx
mov ebp, 1
mov word [eax*4 + 2], dx
mov edx, dword [esp + 0x74]
lea ecx, [eax*4]
mov word [eax*4 + 0x1c], bx
xor ebx, ebx
mov word [eax*4], bp
mov dword [esp + 0x40], ecx
lea esi, [ecx + 0x1e]
movzx ecx, word [esp + 0x94]
mov dword [eax*4 + 8], edx
mov edx, dword [esp + 0x70]
mov dword [eax*4 + 4], 0
mov dword [eax*4 + 0xc], edx
mov edx, dword [esp + 0x78]
mov word [eax*4 + 0x10], cx
xor ecx, ecx
test edi, edi
mov word [eax*4 + 0x1a], cx
mov word [eax*4 + 0x12], dx
mov edx, dword [esp + 0x7c]
mov word [eax*4 + 0x14], dx
mov edx, dword [esp + 0x80]
mov word [eax*4 + 0x16], dx
mov edx, dword [esp + 0x84]
mov word [eax*4 + 0x18], dx
jne 0x406b30
mov eax, dword [esp + 0x38]
add ebx, esi
mov dword [esp + 0x10], 0
mov dword [esp + 8], ebx
mov dword [esp], 0
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x8c]
mov dword [esp + 4], eax
call fcn.00403b70
test eax, eax
jne 0x406839
xor edi, edi
mov word [ebx], di
mov ebx, dword [esp + 0x90]
test ebx, ebx
je 0x406b20
mov dword [esp], 0
call dword [sym.imp.USER32.dll_GetDC]
sub esp, 4
mov edi, eax
mov dword [esp + 4], 0x5a
mov dword [esp], eax
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
sub esp, 8
mov dword [esp + 8], eax
mov eax, dword [esp + 0x90]
mov dword [esp + 4], 0x48
mov eax, dword [eax]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_MulDiv]
sub esp, 0xc
mov ebx, eax
mov dword [esp + 4], edi
mov dword [esp], 0
neg ebx
call dword [sym.imp.USER32.dll_ReleaseDC]
sub esp, 8
mov eax, dword [esp + 0x40]
add esi, dword [esp + 0x3c]
or dword [eax + 0xc], 0x40
mov eax, dword [esp + 0x90]
mov word [esi], bx
add esi, 6
mov eax, dword [eax + 0x10]
mov word [esi - 4], ax
mov eax, dword [esp + 0x90]
movzx eax, byte [eax + 0x14]
mov byte [esi - 2], al
mov eax, dword [esp + 0x90]
movzx eax, byte [eax + 0x17]
mov byte [esi - 1], al
mov eax, dword [esp + 0x90]
mov dword [esp], esi
lea edi, [eax + 0x1c]
mov dword [esp + 4], edi
call fcn.00403e50
mov ecx, dword [esp + 0x94]
mov ebp, dword [esp + 0x98]
mov dword [esp + 0x2c], 0
test ecx, ecx
jg 0x4069fa
jmp 0x406ab0
mov dword [esp], eax
call dword [esp + 0x30]
lea edi, [eax + eax + 2]
sub esp, 4
lea eax, [edi + 0x1d]
mov dword [esp + 0x3c], eax
mov eax, dword [ebp + 8]
test eax, eax
je 0x406a27
mov dword [esp], eax
call dword [esp + 0x30]
lea esi, [eax + eax + 2]
sub esp, 4
lea ecx, [ebx + 0x18]
mov dword [ebx], 0
add edi, ecx
lea eax, [edi + esi]
mov dword [esp + 0x38], eax
mov eax, dword [ebp]
mov edx, dword [eax + 8]
mov dword [ebx + 4], edx
mov edx, dword [eax + 4]
mov eax, dword [eax]
or edx, 0x50000000
mov dword [ebx + 8], edx
xor edx, edx
mov word [ebx + 0xc], dx
xor edx, edx
mov word [ebx + 0xe], dx
xor edx, edx
mov word [ebx + 0x10], dx
xor edx, edx
test eax, eax
mov word [ebx + 0x12], dx
movzx edx, word [ebp + 4]
mov dword [ebx + 0x14], edx
je 0x406a60
mov dword [esp + 4], eax
mov dword [esp], ecx
call fcn.00403e50
mov eax, dword [ebp + 8]
test eax, eax
je 0x406a71
mov dword [esp + 4], eax
mov dword [esp], edi
call fcn.00403e50
mov eax, dword [esp + 0x38]
xor ecx, ecx
add esi, dword [esp + 0x3c]
mov word [eax], cx
mov eax, dword [ebp]
and esi, 0xfffffffc
add dword [esp + 0x34], esi
mov eax, dword [eax + 0x1c]
test eax, eax
je 0x4069e1
call eax
add dword [esp + 0x2c], 1
add ebp, 0x18
mov eax, dword [esp + 0x2c]
cmp eax, dword [esp + 0x94]
je 0x406ab0
mov eax, dword [ebp]
mov ebx, dword [esp + 0x40]
add ebx, dword [esp + 0x34]
mov eax, dword [eax]
test eax, eax
jne 0x406920
mov eax, dword [ebp + 8]
mov dword [esp + 0x3c], 0x1f
mov edi, 2
test eax, eax
jne 0x406940
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov eax, dword [ebp + 0xc]
mov dword [esp], 0
mov dword [esp + 4], eax
call fcn.00403b70
lea esi, [eax + eax + 2]
jmp 0x40694e
xor eax, eax
mov word [ebx + 0x18], ax
mov eax, dword [ebp + 8]
test eax, eax
jne 0x4069b5
mov eax, esi
mov dword [esp + 0x10], 0
mov dword [esp + 8], edi
shr eax, 1
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 0xc]
mov dword [esp], 0
mov dword [esp + 4], eax
call fcn.00403b70
test eax, eax
jne 0x4069c1
xor ebx, ebx
mov word [edi], bx
jmp 0x4069c1
mov eax, dword [esp + 0x44]
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov eax, dword [ebp + 0xc]
mov dword [esp], 0
mov dword [esp + 4], eax
call fcn.00403b70
lea eax, [edi + eax*2 + 2]
jmp 0x406719
mov eax, dword [sym.imp.KERNEL32.dll_lstrlenW]
mov dword [esp], 0x41c810
mov dword [esp + 0x30], eax
call eax
sub esp, 4
mov dword [esp + 0x4c], eax
mov byte [esp + 0x4b], 0
mov dword [esp + 0x2c], 0
jmp 0x40667b
mov eax, dword [esp + 0x40]
and dword [eax + 0xc], 0xffffffbf
jmp 0x4068f9
mov eax, dword [esp + 0x88]
mov dword [esp], esi
mov dword [esp + 4], eax
call fcn.00403e50
cmp byte [esp + 0x4b], 0
jne 0x406b5c
mov ebx, dword [esp + 0x2c]
add ebx, ebx
jmp 0x406803
xor esi, esi
jmp 0x406730
mov edi, dword [esp + 0x2c]
mov dword [esp + 4], 0x41c810
lea eax, [esi + edi*2]
mov dword [esp], eax
call fcn.00403e50
mov ebx, dword [esp + 0x4c]
add ebx, edi
add ebx, ebx
jmp 0x406803
xor eax, eax
jmp 0x406ab4