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

Disassembly:
sub esp, 0x30
push ebx
mov ebx, dword [esp + 0x38]
push esi
push edi
mov edi, dword [esp + 0x44]
push 0xffff001e
lea eax, [edi + ebx*2]
mov esi, ecx
add eax, ebx
mov ecx, dword [eax*4 + 0x497cd8]
push 2
push ecx
mov ecx, dword [esi + 8]
push str.image_sj_sys.dat
call fcn.00410d70
test eax, eax
jne 0x40aeb0
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x30
ret 8
mov ecx, dword [esi + 8]
push 0xffff001e
call fcn.0040fe20
mov dword [esi + 0x18], eax
test eax, eax
je 0x40aea5
push edi
push ebx
mov ecx, esi
call fcn.00409bc0
mov dword [esp + 0x18], eax
test eax, eax
je 0x40aea5
push ebp
xor ebp, ebp
mov dword [esp + 0x18], ebp
test eax, eax
jbe 0x40b2a9
jmp 0x40aeee
mov ebp, dword [esp + 0x18]
mov edi, dword [esp + 0x48]
push ebp
push edi
push ebx
mov ecx, esi
call fcn.00409c00
mov edi, eax
xor ebx, ebx
mov dword [esp + 0x14], edi
mov dword [esp + 0x10], ebx
cmp edi, ebx
jbe 0x40af31
jmp 0x40af10
mov edx, dword [esp + 0x48]
mov eax, dword [esp + 0x44]
push ebx
push ebp
push edx
push eax
mov ecx, esi
call fcn.00409ce0
cmp eax, 1
jne 0x40af2c
inc dword [esp + 0x10]
inc ebx
cmp ebx, edi
jb 0x40af10
mov eax, 0xcccccccd
mul edi
mov ebx, edx
shr ebx, 3
mov ecx, ebx
and ecx, 3
lea eax, [ecx*8 + 0xa0]
mov ecx, ebx
mov dword [esp + 0x20], eax
add eax, 8
shr ecx, 2
mov dword [esp + 0x28], eax
cmp edi, dword [esp + 0x10]
jne 0x40af64
add ecx, 0xa
jmp 0x40af67
add ecx, 7
mov edi, ebp
and edi, 3
imul edi, edi, 0xc3
shr ebp, 2
imul ebp, ebp, 0x9d
shl ecx, 4
lea eax, [edi + 0x70]
mov dword [esp + 0x30], eax
mov dword [esp + 0x38], eax
lea edx, [ecx + 0x10]
lea eax, [ebp + 0x94]
mov dword [esp + 0x34], eax
sub eax, ecx
add eax, edx
mov dword [esp + 0x3c], eax
mov eax, dword [esi + 0x1c]
push 0xff
mov dword [esp + 0x30], edx
lea edx, [esp + 0x24]
mov dword [esp + 0x28], ecx
push edx
add eax, 0x108
push eax
lea ecx, [esp + 0x3c]
push ecx
mov ecx, dword [esi + 0x18]
add ecx, 0x108
call fcn.0040ea20
test eax, eax
je 0x40b4c2
mov edx, dword [esp + 0x14]
lea ecx, [ebx + ebx*4]
mov ebx, dword [esp + 0x10]
add ecx, ecx
mov eax, edx
sub eax, ecx
mov ecx, eax
and ecx, 3
lea ecx, [ecx*8 + 0xa0]
mov dword [esp + 0x20], ecx
add ecx, 8
shr eax, 2
mov dword [esp + 0x28], ecx
cmp edx, ebx
jne 0x40b008
add eax, 0xa
jmp 0x40b00b
add eax, 7
lea ecx, [edi + 0x78]
mov dword [esp + 0x30], ecx
mov dword [esp + 0x38], ecx
shl eax, 4
lea edx, [eax + 0x10]
lea ecx, [ebp + 0x94]
mov dword [esp + 0x34], ecx
sub ecx, eax
add ecx, edx
mov dword [esp + 0x24], eax
mov eax, dword [esi + 0x1c]
push 0xff
mov dword [esp + 0x30], edx
lea edx, [esp + 0x24]
mov dword [esp + 0x40], ecx
push edx
add eax, 0x108
push eax
lea ecx, [esp + 0x3c]
push ecx
mov ecx, dword [esi + 0x18]
add ecx, 0x108
call fcn.0040ea20
test eax, eax
je 0x40b4c2
mov eax, 0xcccccccd
mul ebx
mov ebx, edx
shr ebx, 3
mov edx, ebx
and edx, 3
lea eax, [edx*8 + 0xa0]
mov dword [esp + 0x20], eax
add eax, 8
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x10]
cmp dword [esp + 0x14], eax
mov eax, ebx
jne 0x40b09b
shr eax, 2
add eax, 0xa
jmp 0x40b0a1
shr eax, 2
add eax, 7
lea ecx, [edi + 0x58]
mov dword [esp + 0x30], ecx
mov dword [esp + 0x38], ecx
shl eax, 4
lea edx, [eax + 0x10]
lea ecx, [ebp + 0x94]
mov dword [esp + 0x34], ecx
sub ecx, eax
add ecx, edx
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x2c], edx
mov edx, dword [esi + 0x1c]
push 0xff
lea ecx, [esp + 0x24]
push ecx
mov ecx, dword [esi + 0x18]
add edx, 0x108
mov dword [esp + 0x2c], eax
push edx
lea eax, [esp + 0x3c]
push eax
add ecx, 0x108
call fcn.0040ea20
test eax, eax
je 0x40b4c2
mov edx, dword [esp + 0x10]
lea ecx, [ebx + ebx*4]
add ecx, ecx
mov eax, edx
sub eax, ecx
mov ecx, eax
and ecx, 3
lea ecx, [ecx*8 + 0xa0]
mov dword [esp + 0x20], ecx
add ecx, 8
shr eax, 2
mov dword [esp + 0x28], ecx
cmp dword [esp + 0x14], edx
jne 0x40b12d
add eax, 0xa
jmp 0x40b130
add eax, 7
lea ecx, [edi + 0x60]
mov dword [esp + 0x30], ecx
mov dword [esp + 0x38], ecx
shl eax, 4
lea edx, [eax + 0x10]
lea ebx, [ebp + 0x94]
mov ecx, ebx
mov dword [esp + 0x34], ecx
sub ecx, eax
add ecx, edx
mov dword [esp + 0x24], eax
mov eax, dword [esi + 0x1c]
push 0xff
mov dword [esp + 0x30], edx
lea edx, [esp + 0x24]
mov dword [esp + 0x40], ecx
push edx
add eax, 0x108
push eax
lea ecx, [esp + 0x3c]
push ecx
mov ecx, dword [esi + 0x18]
add ecx, 0x108
call fcn.0040ea20
test eax, eax
je 0x40b4c2
mov edx, dword [esp + 0x10]
cmp dword [esp + 0x14], edx
jne 0x40b1b0
push 0xd0
push 0xb8
push 0xc0
push 0xb0
lea eax, [esp + 0x30]
push eax
jmp 0x40b1c9
push 0xa0
push 0xb8
push 0x90
push 0xb0
lea ecx, [esp + 0x30]
push ecx
call dword [sym.imp.USER32.dll_SetRect]
lea eax, [edi + 0x68]
mov dword [esp + 0x30], eax
mov dword [esp + 0x38], eax
mov eax, ebx
mov dword [esp + 0x34], eax
sub eax, dword [esp + 0x24]
push 0xff
add eax, dword [esp + 0x30]
lea edx, [esp + 0x24]
mov dword [esp + 0x40], eax
mov eax, dword [esi + 0x1c]
push edx
add eax, 0x108
push eax
lea ecx, [esp + 0x3c]
push ecx
mov ecx, dword [esi + 0x18]
add ecx, 0x108
call fcn.0040ea20
test eax, eax
je 0x40b4c2
cmp dword [esp + 0x10], 0
jne 0x40b292
push 0x138
push 0xa0
push 0xc0
push 0
lea edx, [esp + 0x30]
push edx
call dword [sym.imp.USER32.dll_SetRect]
mov ecx, dword [esi + 0x1c]
lea eax, [edi + 0x1c]
mov dword [esp + 0x30], eax
sub eax, dword [esp + 0x20]
push 0xff
add eax, dword [esp + 0x2c]
add ecx, 0x108
mov dword [esp + 0x3c], eax
lea eax, [ebp + 0x14]
mov dword [esp + 0x38], eax
sub eax, dword [esp + 0x28]
lea edx, [esp + 0x34]
add eax, dword [esp + 0x30]
mov dword [esp + 0x40], eax
lea eax, [esp + 0x24]
push eax
push ecx
mov ecx, dword [esi + 0x18]
push edx
add ecx, 0x108
call fcn.0040e7d0
test eax, eax
je 0x40b4c2
mov eax, dword [esp + 0x18]
mov ebx, dword [esp + 0x44]
inc eax
mov dword [esp + 0x18], eax
cmp eax, dword [esp + 0x1c]
jb 0x40aee6
mov ecx, esi
call fcn.0040a820
mov ebp, eax
cmp ebp, 0x64
jb 0x40b3b3
mov edi, dword [sym.imp.USER32.dll_SetRect]
push 0x88
push 0x80
push 0x70
push 0x70
lea eax, [esp + 0x30]
push eax
call edi
push 0x212
push 0x2f0
push 0x1fa
push 0x2e0
lea ecx, [esp + 0x40]
push ecx
call edi
mov eax, dword [esi + 0x1c]
push 0xff
lea edx, [esp + 0x24]
push edx
add eax, 0x108
push eax
lea ecx, [esp + 0x3c]
push ecx
mov ecx, dword [esi + 0x18]
add ecx, 0x108
call fcn.0040ea20
test eax, eax
je 0x40b4c2
push 0x88
push 0x70
push 0x70
push 0x60
lea edx, [esp + 0x30]
push edx
call edi
push 0x212
push 0x2fc
push 0x1fa
push 0x2ec
lea eax, [esp + 0x40]
push eax
call edi
mov edx, dword [esi + 0x1c]
push 0xff
lea ecx, [esp + 0x24]
push ecx
mov ecx, dword [esi + 0x18]
add edx, 0x108
push edx
lea eax, [esp + 0x3c]
push eax
add ecx, 0x108
call fcn.0040ea20
test eax, eax
je 0x40b4c2
push 0x212
push 0x308
push 0x1fa
push 0x2f8
lea ecx, [esp + 0x40]
push ecx
call edi
mov eax, dword [esi + 0x1c]
push 0xff
lea edx, [esp + 0x24]
push edx
add eax, 0x108
push eax
lea ecx, [esp + 0x3c]
push ecx
jmp 0x40b4b0
mov eax, 0xcccccccd
mul ebp
mov edi, edx
shr edi, 3
test edi, edi
je 0x40b441
mov eax, edi
and eax, 3
add eax, 6
shl eax, 4
mov dword [esp + 0x20], eax
add eax, 0x10
mov dword [esp + 0x28], eax
push 0x212
mov eax, edi
shr eax, 2
push 0x2fc
lea eax, [eax + eax*2]
lea eax, [eax*8 + 0x70]
push 0x1fa
mov dword [esp + 0x30], eax
push 0x2ec
lea edx, [esp + 0x40]
add eax, 0x18
push edx
mov dword [esp + 0x40], eax
call dword [sym.imp.USER32.dll_SetRect]
mov ecx, dword [esi + 0x1c]
push 0xff
lea eax, [esp + 0x24]
add ecx, 0x108
push eax
push ecx
mov ecx, dword [esi + 0x18]
lea edx, [esp + 0x3c]
push edx
add ecx, 0x108
call fcn.0040ea20
test eax, eax
je 0x40b4c2
lea ecx, [edi + edi*4]
add ecx, ecx
mov eax, ebp
sub eax, ecx
mov ecx, eax
push 0x212
and ecx, 3
shr eax, 2
push 0x308
add ecx, 6
lea eax, [eax + eax*2]
shl ecx, 4
lea eax, [eax*8 + 0x70]
push 0x1fa
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x30], eax
push 0x2f8
lea edx, [esp + 0x40]
add ecx, 0x10
add eax, 0x18
push edx
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x40], eax
call dword [sym.imp.USER32.dll_SetRect]
mov ecx, dword [esi + 0x1c]
push 0xff
lea eax, [esp + 0x24]
push eax
add ecx, 0x108
push ecx
lea edx, [esp + 0x3c]
push edx
mov ecx, dword [esi + 0x18]
add ecx, 0x108
call fcn.0040ea20
test eax, eax
jne 0x40b4ce
pop ebp
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x30
ret 8
mov eax, dword [esp + 0x48]
mov dword [esi + 0x1744], eax
pop ebp
or eax, 0xffffffff
pop edi
mov dword [esi + 0x1740], ebx
mov dword [esi + 0x1748], eax
mov dword [esi + 0x174c], eax
pop esi
mov eax, 1
pop ebx
add esp, 0x30
ret 8