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

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x48
mov eax, dword [esp + 0xa0]
mov edi, dword [esp + 0x5c]
mov esi, dword [edi + 0x48]
mov ebx, dword [esi + 4]
mov dword [esp + 0x44], ebx
test eax, eax
je 0x40a642
cmp dword [esi + 0x34], 0
jne 0x40a642
mov dword [edi + 0x1c], 3
jmp 0x40ab6e
movzx ecx, word [esp + 0x6c]
movzx edx, word [esp + 0x64]
movzx ecx, cx
movzx ebp, word [esp + 0x74]
mov dword [esp + 0x38], ecx
mov dword [esp + 0x3c], edx
add ecx, edx
add ecx, ebp
xor edx, edx
add ecx, dword [esp + 0xac]
setb dl
add ecx, ebx
adc edx, 0
add ecx, 0x2e
adc edx, 0
cmp ecx, 0xffffffff
sbb edx, 0
jb 0x40a68b
mov dword [edi + 0x1c], 0xf
jmp 0x40ab6e
mov dword [esp + 0x34], ebp
mov dword [esp], ebx
mov ebp, dword [esp + 0x84]
mov edi, dword [esp + 0x7c]
mov dword [esp + 0xa], 0
mov dword [esp + 0xe], 0
mov dword [esp + 0x12], 0
mov dword [esp + 0x16], 0
mov dword [esp + 0x1a], 0
mov dword [esp + 0x1e], 0
mov dword [esp + 0x22], 0
mov dword [esp + 0x26], 0
mov word [esp + 0x2a], 0
mov dword [esp + 6], 0x2014b50
mov ebx, dword [esp + 0x88]
movzx ecx, word [esp + 0x6c]
mov edx, dword [esp + 0xac]
add ecx, edx
mov dword [esp + 0x40], ecx
xor ecx, ecx
mov edx, 0
cmp word [esp + 0x8c], 0
je 0x40a719
mov dl, 0x14
mov byte [esp + 0xc], dl
movzx edx, word [esp + 0x90]
mov byte [esp + 0xe], dl
mov byte [esp + 0xf], dh
movzx edx, word [esp + 0x8c]
mov byte [esp + 0x10], dl
mov byte [esp + 0x11], dh
movzx edx, word [esp + 0x94]
mov byte [esp + 0x12], dl
mov byte [esp + 0x13], dh
movzx edx, word [esp + 0x98]
mov byte [esp + 0x14], dl
mov byte [esp + 0x15], dh
mov byte [esp + 0x16], bl
mov byte [esp + 0x17], bh
mov edx, ebx
shr edx, 0x10
mov byte [esp + 0x18], dl
shr ebx, 0x18
neg ebp
mov edx, 0
sbb edx, edx
mov byte [esp + 0x19], bl
or edx, dword [esp + 0x80]
mov byte [esp + 0x1a], dl
mov byte [esp + 0x1b], dh
mov ebx, edx
shr ebx, 0x10
mov byte [esp + 0x1c], bl
shr edx, 0x18
neg edi
mov ebx, 0
sbb ebx, ebx
mov byte [esp + 0x1d], dl
or ebx, dword [esp + 0x78]
mov byte [esp + 0x1e], bl
mov byte [esp + 0x1f], bh
mov edx, ebx
shr edx, 0x10
mov byte [esp + 0x20], dl
shr ebx, 0x18
mov byte [esp + 0x21], bl
movzx edx, word [esp + 0x64]
mov byte [esp + 0x22], dl
mov byte [esp + 0x23], dh
mov edx, dword [esp + 0x40]
mov byte [esp + 0x24], dl
mov byte [esp + 0x25], dh
movzx edx, word [esp + 0x74]
mov byte [esp + 0x26], dl
mov byte [esp + 0x27], dh
mov ebx, dword [esp + 0xa4]
mov byte [esp + 0x2c], bl
mov byte [esp + 0x2d], bh
mov edx, ebx
shr edx, 0x10
mov byte [esp + 0x2e], dl
shr ebx, 0x18
neg eax
sbb ecx, ecx
mov byte [esp + 0x2f], bl
or ecx, dword [esp + 0x9c]
mov byte [esp + 0x30], cl
mov byte [esp + 0x31], ch
mov eax, ecx
shr eax, 0x10
mov byte [esp + 0x32], al
shr ecx, 0x18
mov byte [esp + 0x33], cl
mov ebp, dword [esp]
mov eax, ebp
and eax, 0x2e
mov ecx, ebp
xor ecx, 0x2e
lea edi, [ecx + eax*2]
mov eax, dword [esi + 8]
cmp eax, edi
jae 0x40a87d
cmp eax, 1
adc eax, 0
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov ebx, eax
add eax, eax
cmp ebx, edi
jb 0x40a850
push ebx
push dword [esi + 0xc]
push dword [esi]
mov eax, dword [esp + 0x68]
push dword [eax + 0x34]
call dword [eax + 0x30]
add esp, 0x10
test eax, eax
je 0x40ab40
mov dword [esi], eax
mov dword [esi + 8], ebx
mov ebp, dword [esp]
jmp 0x40a87f
mov eax, dword [esi]
mov dword [esi + 4], edi
mov ecx, dword [esi + 0xc]
mov edi, ecx
not edi
and edi, ebp
mov edx, ebp
not edx
and edx, ecx
imul edx, edi
mov edi, ecx
and edi, ebp
imul ebx, ecx, 0x2e
or ecx, ebp
imul ecx, edi
add ecx, eax
add ecx, edx
lea eax, [esp + 6]
push ebx
push eax
push ecx
call fcn.0040cd00
add esp, 0xc
mov ebx, dword [esi + 4]
mov edi, dword [esi + 8]
mov eax, ebx
mov edx, dword [esp + 0x3c]
and eax, edx
mov ecx, ebx
xor ecx, edx
lea ebp, [ecx + eax*2]
cmp edi, ebp
jae 0x40a908
cmp edi, 1
adc edi, 0
mov eax, edi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov edi, eax
add eax, eax
cmp edi, ebp
jb 0x40a8e0
push edi
push dword [esi + 0xc]
push dword [esi]
mov eax, dword [esp + 0x68]
push dword [eax + 0x34]
call dword [eax + 0x30]
add esp, 0x10
test eax, eax
je 0x40ab40
mov dword [esi], eax
mov dword [esi + 8], edi
mov dword [esi + 4], ebp
cmp word [esp + 0x64], 0
je 0x40a94d
mov eax, dword [esi + 0xc]
mov edx, eax
not edx
and edx, ebx
mov ecx, ebx
not ecx
and ecx, eax
imul ecx, edx
mov edx, eax
and edx, ebx
or ebx, eax
imul ebx, edx
add ebx, dword [esi]
add ebx, ecx
mov ecx, dword [esp + 0x3c]
imul ecx, eax
push ecx
push dword [esp + 0x64]
push ebx
call fcn.0040cd00
add esp, 0xc
mov ebp, dword [esi + 4]
mov edi, dword [esi + 8]
mov eax, ebp
mov edx, dword [esp + 0x38]
and eax, edx
mov ecx, ebp
xor ecx, edx
lea ebx, [ecx + eax*2]
cmp edi, ebx
jae 0x40a998
cmp edi, 1
adc edi, 0
mov eax, edi
nop
nop
nop
nop
nop
nop
nop
nop
mov edi, eax
add eax, eax
cmp edi, ebx
jb 0x40a970
push edi
push dword [esi + 0xc]
push dword [esi]
mov eax, dword [esp + 0x68]
push dword [eax + 0x34]
call dword [eax + 0x30]
add esp, 0x10
test eax, eax
je 0x40ab40
mov dword [esi], eax
mov dword [esi + 8], edi
mov dword [esi + 4], ebx
movzx eax, word [esp + 0x6c]
test ax, ax
je 0x40a9df
mov eax, dword [esi + 0xc]
mov edx, eax
not edx
and edx, ebp
mov ecx, ebp
not ecx
and ecx, eax
imul ecx, edx
mov edx, eax
and edx, ebp
or ebp, eax
imul ebp, edx
add ebp, dword [esi]
add ebp, ecx
mov ecx, dword [esp + 0x38]
imul ecx, eax
push ecx
push dword [esp + 0x6c]
push ebp
call fcn.0040cd00
add esp, 0xc
mov ebx, dword [esi + 4]
mov edi, dword [esi + 8]
mov eax, ebx
mov edx, dword [esp + 0xac]
and eax, edx
mov ecx, ebx
xor ecx, edx
lea ebp, [ecx + eax*2]
cmp edi, ebp
jae 0x40aa28
cmp edi, 1
adc edi, 0
mov eax, edi
nop
nop
nop
mov edi, eax
add eax, eax
cmp edi, ebp
jb 0x40aa00
push edi
push dword [esi + 0xc]
push dword [esi]
mov eax, dword [esp + 0x68]
push dword [eax + 0x34]
call dword [eax + 0x30]
add esp, 0x10
test eax, eax
je 0x40ab40
mov dword [esi], eax
mov dword [esi + 8], edi
mov dword [esi + 4], ebp
mov eax, dword [esp + 0xac]
test eax, eax
je 0x40aa71
mov edi, eax
mov eax, dword [esi + 0xc]
mov edx, eax
not edx
and edx, ebx
mov ecx, ebx
not ecx
and ecx, eax
imul ecx, edx
mov edx, eax
and edx, ebx
or ebx, eax
imul ebx, edx
add ebx, dword [esi]
add ebx, ecx
imul edi, eax
push edi
push dword [esp + 0xac]
push ebx
call fcn.0040cd00
add esp, 0xc
mov ebp, dword [esi + 4]
mov edi, dword [esi + 8]
mov eax, ebp
mov edx, dword [esp + 0x34]
and eax, edx
mov ecx, ebp
xor ecx, edx
lea ebx, [ecx + eax*2]
cmp edi, ebx
jae 0x40aa9d
mov ecx, dword [esp + 0x5c]
mov edx, esi
push 1
push ebx
call fcn.0040cbd0
add esp, 8
test eax, eax
je 0x40ab40
mov dword [esi + 4], ebx
cmp word [esp + 0x74], 0
je 0x40aadc
mov eax, dword [esi + 0xc]
mov edx, eax
not edx
and edx, ebp
mov ecx, ebp
not ecx
and ecx, eax
imul ecx, edx
mov edx, eax
and edx, ebp
or ebp, eax
imul ebp, edx
add ebp, dword [esi]
add ebp, ecx
mov ecx, dword [esp + 0x34]
imul ecx, eax
push ecx
push dword [esp + 0x74]
push ebp
call fcn.0040cd00
add esp, 0xc
mov edi, dword [esi + 0x14]
mov eax, edi
and eax, 1
mov ecx, edi
xor ecx, 1
lea ebx, [ecx + eax*2]
cmp dword [esi + 0x18], ebx
jae 0x40ab07
lea edx, [esi + 0x10]
mov ecx, dword [esp + 0x5c]
push 1
push ebx
call fcn.0040cbd0
add esp, 8
test eax, eax
je 0x40ab40
mov dword [esi + 0x14], ebx
mov eax, dword [esi + 0x1c]
mov edx, eax
not edx
and edx, edi
mov ecx, edi
not ecx
and ecx, eax
imul ecx, edx
mov edx, eax
and edx, edi
or edi, eax
imul edi, edx
add edi, dword [esi + 0x10]
add edi, ecx
lea ecx, [esp + 0x44]
push eax
push ecx
push edi
call fcn.0040cd00
add esp, 0xc
mov eax, 1
jmp 0x40ab70
mov ebx, dword [esp]
cmp dword [esi + 8], ebx
mov edi, dword [esp + 0x5c]
jae 0x40ab64
push ebx
push dword [esi + 0xc]
push dword [esi]
push dword [edi + 0x34]
call dword [edi + 0x30]
add esp, 0x10
test eax, eax
je 0x40ab67
mov dword [esi], eax
mov dword [esi + 8], ebx
mov dword [esi + 4], ebx
mov dword [edi + 0x1c], 0x10
xor eax, eax
add esp, 0x48
pop esi
pop edi
pop ebx
pop ebp
ret