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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x4c
call fcn.00403c90
mov esi, dword [eax + 0x24]
cmp esi, dword [esp + 0x68]
jg 0x4097c6
mov edx, dword [eax + 0x28]
mov ebx, eax
cmp edx, dword [esp + 0x6c]
jg 0x4097c6
mov edi, dword [eax + 0x2c]
add edi, esi
cmp edi, dword [esp + 0x60]
jle 0x4097c6
mov eax, dword [eax + 0x30]
add eax, edx
cmp eax, dword [esp + 0x64]
jg 0x4097d0
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
cmp esi, dword [esp + 0x60]
cmovl esi, dword [esp + 0x60]
cmp edx, dword [esp + 0x64]
cmovl edx, dword [esp + 0x64]
sub edi, 1
cmp edi, dword [esp + 0x68]
cmovg edi, dword [esp + 0x68]
sub eax, 1
cmp eax, dword [esp + 0x6c]
cmovg eax, dword [esp + 0x6c]
mov dword [esp + 0x20], edx
mov ebp, edx
mov dword [esp + 0x1c], eax
call fcn.00409650
mov eax, dword [esp + 0x74]
test eax, eax
je 0x409880
mov eax, dword [esp + 0x1c]
mov ecx, ebp
sub edi, esi
add edi, 1
imul esi, dword [ebx + 0x10]
sub eax, ebp
mov ebp, eax
mov eax, dword [ebx + 8]
add esi, dword [eax + ecx*4]
add ebp, 1
je 0x40984d
nop
mov eax, dword [esp + 0x70]
mov dword [esp], esi
mov dword [esp + 8], edi
mov dword [esp + 4], eax
call dword [ebx + 0x64]
add esi, dword [ebx + 0x14]
sub ebp, 1
jne 0x409830
mov eax, dword [ebx + 8]
mov edx, dword [0x428d34]
mov eax, dword [eax]
cmp dword [edx + 0x14], eax
je 0x409b20
mov dword [esp + 4], 0
mov dword [esp], 1
call fcn.004096a0
sub esp, 8
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
cmp dword [esp + 0x78], 0xffff
mov dword [esp + 0x3c], 0x8000
je 0x4099c8
mov eax, esi
mov ecx, esi
sub cl, byte [esp + 0x60]
mov byte [esp + 0x27], al
and ecx, 0xf
ror word [esp + 0x3c], cl
mov eax, edi
mov byte [esp + 0x26], al
mov eax, dword [ebx + 0x30]
add eax, dword [ebx + 0x28]
cmp dword [esp + 0x6c], eax
jge 0x409b70
lea eax, [edi + 1]
cmp esi, edi
jg 0x409916
mov dword [esp + 0x28], esi
mov ebp, eax
mov dword [esp + 0x2c], edi
mov edi, ebx
mov ebx, dword [esp + 0x78]
lea esi, [esi]
nop
test dword [esp + 0x3c], ebx
je 0x409900
mov eax, dword [esp + 0x70]
mov dword [esp + 4], esi
mov dword [esp], edi
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x6c]
mov dword [esp + 8], eax
call dword [edi + 0x5c]
ror word [esp + 0x3c], 1
add esi, 1
cmp esi, ebp
jne 0x4098e0
mov ebx, edi
mov esi, dword [esp + 0x28]
mov edi, dword [esp + 0x2c]
movzx eax, byte [esp + 0x68]
mov byte [esp + 0x28], al
mov ecx, eax
mov eax, edi
sub cl, byte [esp + 0x60]
add cl, byte [esp + 0x27]
sub ecx, eax
and ecx, 0xf
ror word [esp + 0x3c], cl
mov eax, dword [ebx + 0x28]
cmp dword [esp + 0x64], eax
jl 0x409b50
lea ebp, [edi + 1]
cmp esi, edi
jg 0x40997c
mov edi, dword [esp + 0x78]
lea esi, [esi]
test dword [esp + 0x3c], edi
je 0x409970
mov eax, dword [esp + 0x70]
mov dword [esp + 4], esi
mov dword [esp], ebx
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x64]
mov dword [esp + 8], eax
call dword [ebx + 0x5c]
ror word [esp + 0x3c], 1
add esi, 1
cmp esi, ebp
jne 0x409950
mov ecx, dword [esp + 0x20]
movzx edx, byte [esp + 0x64]
mov eax, ecx
sub ecx, edx
add cl, byte [esp + 0x28]
sub cl, byte [esp + 0x26]
and ecx, 0xf
ror word [esp + 0x3c], cl
mov ecx, dword [ebx + 0x2c]
add ecx, dword [ebx + 0x24]
cmp dword [esp + 0x68], ecx
jl 0x409a3f
mov ecx, dword [esp + 0x1c]
mov esi, ecx
sub cl, byte [esp + 0x20]
add ecx, 1
and ecx, 0xf
ror word [esp + 0x3c], cl
jmp 0x409aa7
mov eax, dword [ebx + 0x28]
mov edx, dword [ebx + 0x30]
add edx, eax
cmp dword [esp + 0x6c], edx
jge 0x409a02
mov eax, edi
mov ecx, dword [esp + 0x6c]
sub eax, esi
add eax, 1
mov dword [esp + 8], eax
mov eax, dword [esp + 0x70]
mov dword [esp + 4], eax
mov edx, dword [ebx + 8]
mov eax, dword [ebx + 0x10]
imul eax, esi
add eax, dword [edx + ecx*4]
mov dword [esp], eax
call dword [ebx + 0x64]
mov eax, dword [ebx + 0x28]
cmp dword [esp + 0x64], eax
jl 0x409a2d
sub edi, esi
mov ecx, dword [esp + 0x64]
lea eax, [edi + 1]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x70]
mov dword [esp + 4], eax
mov eax, dword [ebx + 8]
imul esi, dword [ebx + 0x10]
add esi, dword [eax + ecx*4]
mov dword [esp], esi
call dword [ebx + 0x64]
mov eax, dword [ebx + 0x24]
mov edx, dword [ebx + 0x2c]
add edx, eax
cmp dword [esp + 0x68], edx
jge 0x409abe
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x20]
lea esi, [eax + 1]
mov edi, edx
cmp edx, eax
jg 0x409a8e
mov eax, ebx
mov ebp, dword [esp + 0x78]
mov ebx, edi
mov edi, eax
lea esi, [esi]
test dword [esp + 0x3c], ebp
je 0x409a80
mov eax, dword [esp + 0x70]
mov dword [esp + 8], ebx
mov dword [esp], edi
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x68]
mov dword [esp + 4], eax
call dword [edi + 0x5c]
ror word [esp + 0x3c], 1
add ebx, 1
cmp ebx, esi
jne 0x409a60
mov ebx, edi
cmp dword [esp + 0x78], 0xffff
je 0x409abb
movzx eax, byte [esp + 0x20]
movzx edx, byte [esp + 0x64]
movzx esi, byte [esp + 0x1c]
add al, byte [esp + 0x6c]
mov ecx, esi
sub eax, edx
sub eax, ecx
mov ecx, eax
and ecx, 0xf
ror word [esp + 0x3c], cl
mov eax, dword [ebx + 0x24]
cmp dword [esp + 0x60], eax
jl 0x40984a
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x20]
mov ebp, dword [esp + 0x78]
lea esi, [eax + 1]
mov edi, edx
cmp edx, eax
jg 0x40984a
lea esi, [esi]
test dword [esp + 0x3c], ebp
je 0x409b08
mov eax, dword [esp + 0x70]
mov dword [esp + 8], edi
mov dword [esp], ebx
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x60]
mov dword [esp + 4], eax
call dword [ebx + 0x5c]
ror word [esp + 0x3c], 1
add edi, 1
cmp edi, esi
jne 0x409ae8
jmp 0x40984a
mov ecx, dword [esp + 0x20]
mov eax, dword [esp + 0x1c]
mov dword [esp + 4], 1
sub eax, ecx
add eax, 1
mov dword [esp + 8], eax
mov eax, dword [edx + 0x38]
add eax, ecx
mov dword [esp], eax
call dword [0x4211c4]
jmp 0x40985e
mov eax, edi
mov ecx, edi
mov byte [esp + 0x26], al
mov eax, esi
sub ecx, eax
add ecx, 1
and ecx, 0xf
ror word [esp + 0x3c], cl
jmp 0x40997c
mov ecx, edi
mov eax, esi
sub ecx, eax
add ecx, 1
and ecx, 0xf
ror word [esp + 0x3c], cl
jmp 0x409916