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

Disassembly:
sub esp, 0x5c
push esi
mov esi, ecx
mov eax, dword [esi + 0x43c]
test eax, eax
mov dword [esp + 0x2c], eax
jne 0x4099be
or eax, 0xffffffff
pop esi
add esp, 0x5c
ret 0x28
mov ecx, dword [esi + 0x44c]
mov eax, ecx
sub eax, dword [esp + 0x64]
push ebx
sub eax, dword [esp + 0x70]
sub eax, dword [esp + 0x78]
js 0x40a136
mov ebx, dword [esi + 0x450]
mov edx, ebx
sub edx, dword [esp + 0x6c]
sub edx, dword [esp + 0x74]
sub edx, dword [esp + 0x7c]
js 0x40a136
mov al, byte [esi + 4]
mov edx, dword [esi + 8]
mov byte [esp + 0xb], al
mov eax, dword [esi + 0xc]
mov dword [esp + 0x3c], eax
mov eax, dword [esi + 0x444]
mov dword [esp + 0x2c], eax
movzx eax, word [esi + 0x22]
imul eax, dword [esi + 0x18]
mov dword [esp + 0x38], edx
mov edx, dword [esi + 0x10]
add eax, 7
mov dword [esp + 0x40], edx
mov edx, dword [esi + 0x448]
push ebp
mov dword [esp + 0x2c], edx
cdq
push edi
mov edi, dword [esi + 0x440]
and edx, 7
add eax, edx
sar eax, 3
add eax, 3
and eax, 0xfffffffc
mov dword [esp + 0x1c], eax
mov dword [esp + 0x3c], edi
and edi, 0xff
mov eax, edi
cdq
and edx, 7
add eax, edx
push 0
sar eax, 3
cmp dword [esi + 0x1c], 0
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x98]
setl byte [esp + 0x24]
sub ecx, dword [esp + 0x74]
mov edx, dword [esp + 0x24]
sub ecx, dword [esp + 0x7c]
push eax
sub ecx, dword [esp + 0x88]
mov eax, dword [esp + 0x44]
push edx
mov ebp, ebx
sub ebp, dword [esp + 0x80]
push 1
sub ebp, dword [esp + 0x8c]
push 1
sub ebp, dword [esp + 0x98]
mov dword [esp + 0x28], ecx
push ebp
push ecx
push 0
push 0
push eax
mov ecx, esi
mov byte [esi + 4], 0
call fcn.0041e8e0
test eax, eax
mov dword [esp + 0x28], eax
jne 0x40a0eb
movzx eax, word [esi + 0x22]
imul eax, dword [esi + 0x18]
mov ecx, dword [esi + 0x43c]
add eax, 7
mov esi, dword [esi + 0x440]
cdq
and edx, 7
add eax, edx
mov dword [esp + 0x94], ecx
mov ecx, eax
mov eax, dword [esp + 0x34]
imul eax, edi
cdq
sar ecx, 3
and edx, 7
add ecx, 3
sar esi, 3
add eax, edx
and ecx, 0xfffffffc
and esi, 0x1f
sar eax, 3
cmp byte [esp + 0x20], 0
mov dword [esp + 0x18], ecx
mov dword [esp + 0x24], esi
je 0x409b33
mov edx, dword [esp + 0x1c]
imul edx, dword [esp + 0x30]
add edx, dword [esp + 0x38]
add edx, eax
mov dword [esp + 0x20], edx
jmp 0x409b64
sub ebx, dword [esp + 0x30]
mov esi, dword [esp + 0x1c]
add eax, dword [esp + 0x38]
sub ebx, 1
imul ebx, esi
add eax, ebx
mov dword [esp + 0x20], eax
lea eax, [ebp - 1]
imul eax, ecx
add dword [esp + 0x94], eax
neg esi
neg ecx
mov dword [esp + 0x1c], esi
mov dword [esp + 0x18], ecx
cmp dword [esp + 0x70], 0
jl 0x409b98
cmp dword [esp + 0x78], 0
jl 0x409b98
cmp dword [esp + 0x74], 0
jl 0x409b98
cmp dword [esp + 0x7c], 0
jl 0x409b98
cmp dword [esp + 0x80], 0
jl 0x409b98
cmp dword [esp + 0x84], 0
jge 0x409e86
mov eax, dword [esp + 0x88]
movzx ebx, byte [esp + 0x8a]
movzx edx, al
shl edx, 0x10
and eax, 0xff00
or ebx, edx
or ebx, eax
mov eax, dword [esp + 0x3c]
cmp eax, 0x8000008
jg 0x409d4d
je 0x409cbe
mov edx, eax
sub edx, 0x4000010
je 0x409bec
sub edx, 8
je 0x409d5f
sub edx, 8
je 0x409d5f
jmp 0x409e86
mov eax, ebx
shr eax, 0x10
and eax, 0xff
mov edx, eax
shl edx, 5
sub edx, eax
mov eax, 0x80808081
mul edx
shr edx, 7
mov esi, edx
movzx eax, bh
mov edx, eax
shl edx, 6
sub edx, eax
mov eax, 0x80808081
mul edx
shr edx, 7
movzx eax, bl
shl esi, 6
or esi, edx
mov edx, eax
shl edx, 5
sub edx, eax
mov eax, 0x80808081
mul edx
mov eax, dword [esp + 0x94]
shl esi, 5
shr edx, 7
or esi, edx
xor ebx, ebx
test ebp, ebp
mov dword [esp + 0x88], eax
jle 0x409e86
mov edi, dword [esp + 0x8c]
lea ebx, [ebx]
test edi, edi
je 0x409c78
mov ecx, dword [esp + 0x90]
push ecx
push ebp
push ebx
call edi
test eax, eax
jne 0x409e7a
cmp dword [esp + 0x14], 0
jle 0x409ca7
mov ecx, dword [esp + 0x14]
mov edi, dword [esp + 0x88]
mov eax, esi
mov dx, ax
shl edx, 0x10
mov dx, ax
shr ecx, 1
mov eax, edx
rep stosd dword es:[edi], eax
adc ecx, ecx
rep stosw word es:[edi], ax
mov edi, dword [esp + 0x8c]
mov ecx, dword [esp + 0x18]
add dword [esp + 0x88], ecx
add ebx, 1
cmp ebx, ebp
jl 0x409c60
jmp 0x409e86
mov eax, ebx
shr eax, 0x10
and eax, 0xff
movzx edx, bh
imul eax, eax, 0x4c8b
imul edx, edx, 0x9646
mov edi, dword [esp + 0x94]
add eax, edx
movzx edx, bl
imul edx, edx, 0x1d2f
add eax, edx
shr eax, 0x10
xor esi, esi
test ebp, ebp
mov byte [esp + 0x88], al
jle 0x409e86
mov ebx, dword [esp + 0x8c]
test ebx, ebx
je 0x409d1e
mov eax, dword [esp + 0x90]
push eax
push ebp
push esi
call ebx
test eax, eax
jne 0x409e7a
cmp dword [esp + 0x14], 0
jle 0x409d3b
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x88]
push ecx
push edx
push edi
call fcn.00478270
add esp, 0xc
mov ecx, dword [esp + 0x18]
add esi, 1
add edi, ecx
cmp esi, ebp
jl 0x409d06
jmp 0x409e86
cmp eax, 0x8000018
je 0x409d6a
cmp eax, 0x10000020
jne 0x409e86
cmp eax, 0x8000018
jne 0x409e19
and ebx, 0xffffff
mov edx, ebx
sar edx, 0x10
and edx, 0xff
movzx esi, bh
imul edx, edx, 0x41bd
imul esi, esi, 0x810f
add edx, esi
mov eax, ebx
and eax, 0xff
mov esi, eax
imul esi, esi, 0x1910
lea esi, [edx + esi + 0x108000]
sar esi, 0x10
lea edx, [esi - 0x10]
imul edx, edx, 0x12a15
shl eax, 0x10
sub eax, edx
sar eax, 0xa
imul eax, eax, 0x1fb
add eax, 0x808000
sar eax, 0x10
jns 0x409dca
xor eax, eax
jmp 0x409dd6
cmp eax, 0xff
jle 0x409dd6
mov eax, 0xff
and ebx, 0xff0000
sub ebx, edx
sar ebx, 0xa
imul ebx, ebx, 0x282
add ebx, 0x808000
sar ebx, 0x10
jns 0x409e00
xor ebx, ebx
shl ebx, 8
add ebx, eax
shl ebx, 8
add ebx, esi
jmp 0x409e1f
cmp ebx, 0xff
jle 0x409e0d
mov ebx, 0xff
shl ebx, 8
add ebx, eax
shl ebx, 8
add ebx, esi
jmp 0x409e1f
or ebx, 0xff000000
mov edi, dword [esp + 0x94]
xor esi, esi
test ebp, ebp
jle 0x409e86
lea esp, [esp]
cmp dword [esp + 0x8c], 0
je 0x409e4f
mov eax, dword [esp + 0x90]
push eax
push ebp
push esi
call dword [esp + 0x98]
test eax, eax
jne 0x409e7a
mov ecx, dword [esp + 0x14]
test ecx, ecx
mov eax, edi
jle 0x409e6b
lea esp, [esp]
mov dword [eax], ebx
add eax, dword [esp + 0x24]
sub ecx, 1
jne 0x409e60
mov ecx, dword [esp + 0x18]
add esi, 1
add edi, ecx
cmp esi, ebp
jl 0x409e30
jmp 0x409e86
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x28], 0x63
mov eax, dword [esp + 0x70]
test eax, eax
jge 0x409ea4
mov edx, dword [esp + 0x24]
mov esi, edx
imul esi, eax
sub dword [esp + 0x94], esi
add dword [esp + 0x14], eax
jmp 0x409eb3
mov edx, dword [esp + 0x2c]
imul edx, eax
add dword [esp + 0x20], edx
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x74]
test eax, eax
jge 0x409ec9
imul ecx, eax
sub dword [esp + 0x94], ecx
add ebp, eax
jmp 0x409ed4
mov ecx, dword [esp + 0x1c]
imul ecx, eax
add dword [esp + 0x20], ecx
mov eax, dword [esp + 0x78]
test eax, eax
jge 0x409ee0
add dword [esp + 0x14], eax
mov eax, dword [esp + 0x7c]
test eax, eax
jge 0x409eea
add ebp, eax
mov eax, dword [esp + 0x80]
test eax, eax
jne 0x409f21
cmp dword [esp + 0x84], eax
jne 0x409f4a
imul edx, dword [esp + 0x14]
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x18]
push ebp
push edx
mov edx, dword [esp + 0x24]
push edx
mov edx, dword [esp + 0xa0]
push eax
push ecx
push edx
jmp 0x40a0e3
jge 0x409f4a
mov eax, dword [esp + 0x14]
cdq
sub eax, edx
mov ecx, eax
mov eax, dword [esp + 0x80]
cdq
sar ecx, 1
sub eax, edx
sar eax, 1
lea edi, [eax + ecx]
mov dword [esp + 0x8c], ecx
mov dword [esp + 0x54], edi
jmp 0x409f60
mov eax, dword [esp + 0x14]
cdq
sub eax, edx
sar eax, 1
mov dword [esp + 0x8c], eax
mov edi, eax
mov dword [esp + 0x54], eax
mov ecx, dword [esp + 0x84]
mov eax, ebp
cdq
sub eax, edx
test ecx, ecx
jge 0x409f83
mov esi, eax
mov eax, ecx
cdq
sub eax, edx
sar esi, 1
sar eax, 1
add esi, eax
mov dword [esp + 0x58], esi
jmp 0x409f8b
sar eax, 1
mov esi, eax
mov dword [esp + 0x58], eax
mov ecx, dword [esp + 0x1c]
mov ebx, dword [esp + 0x20]
mov edx, dword [esp + 0x18]
mov eax, edi
imul eax, dword [esp + 0x24]
push esi
push eax
mov eax, dword [esp + 0x9c]
push ecx
push ebx
push edx
push eax
call fcn.00409900
mov ecx, dword [esp + 0x6c]
add esp, 0x18
cmp dword [esp + 0x80], 0
jge 0x409fca
sub edi, dword [esp + 0x80]
jmp 0x409fd3
mov edx, dword [esp + 0x80]
add ecx, edx
imul ecx, dword [esp + 0x2c]
mov eax, edi
mov edi, dword [esp + 0x14]
mov edx, edi
sub edx, eax
imul eax, dword [esp + 0x24]
imul edx, dword [esp + 0x24]
add eax, dword [esp + 0x94]
push esi
push edx
mov edx, dword [esp + 0x24]
push edx
add ecx, ebx
push ecx
mov ecx, dword [esp + 0x28]
push ecx
push eax
call fcn.00409900
mov eax, dword [esp + 0x9c]
add esp, 0x18
test eax, eax
jge 0x40a020
sub esi, eax
mov ecx, esi
mov esi, dword [esp + 0x58]
jmp 0x40a029
mov edx, dword [esp + 0x58]
mov ecx, esi
lea esi, [edx + eax]
mov eax, dword [esp + 0x80]
test eax, eax
jge 0x40a044
cdq
sub eax, edx
mov edx, dword [esp + 0x8c]
sar eax, 1
add eax, edx
jmp 0x40a04b
mov eax, dword [esp + 0x8c]
mov dword [esp + 0x64], eax
mov edx, dword [esp + 0x64]
imul edx, dword [esp + 0x24]
mov dword [esp + 0x54], eax
mov eax, dword [esp + 0x1c]
imul esi, eax
sub ebp, ecx
mov ebx, ecx
mov ecx, dword [esp + 0x18]
push ebp
imul ebx, ecx
push edx
push eax
mov eax, dword [esp + 0x2c]
lea edx, [esi + eax]
mov eax, dword [esp + 0xa0]
push edx
push ecx
lea ecx, [ebx + eax]
push ecx
call fcn.00409900
mov eax, dword [esp + 0x7c]
add esp, 0x18
cmp dword [esp + 0x80], 0
jge 0x40a0a8
sub eax, dword [esp + 0x80]
mov ecx, dword [esp + 0x54]
jmp 0x40a0b5
mov edx, dword [esp + 0x54]
mov ecx, dword [esp + 0x80]
add ecx, edx
mov edx, dword [esp + 0x24]
imul ecx, dword [esp + 0x2c]
sub edi, eax
imul eax, edx
imul edi, edx
push ebp
push edi
mov edi, dword [esp + 0x24]
add ecx, esi
add ecx, dword [esp + 0x28]
push edi
push ecx
mov ecx, dword [esp + 0x28]
add eax, ebx
add eax, dword [esp + 0xa4]
push ecx
push eax
call fcn.00409900
add esp, 0x18
cmp byte [esp + 0x13], 0
je 0x40a128
mov eax, dword [esp + 0x40]
test eax, eax
je 0x40a101
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
mov eax, dword [esp + 0x44]
test eax, eax
je 0x40a117
push 0x8000
push 0
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, dword [esp + 0x48]
test eax, eax
je 0x40a128
push eax
call fcn.0047841b
add esp, 4
mov eax, dword [esp + 0x28]
pop edi
pop ebp
pop ebx
pop esi
add esp, 0x5c
ret 0x28
mov ecx, esi
call fcn.0041e6e0
pop ebx
xor eax, eax
pop esi
add esp, 0x5c
ret 0x28