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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x6c
push ebx
push esi
push edi
mov edi, edx
mov ebx, ecx
mov dword [esp + 0x24], edi
mov dword [esp + 0xc], ebx
mov edx, dword [edi + 0x78]
mov ecx, dword [edi + 8]
call fcn.00405ab0
mov esi, eax
test esi, esi
je case.0x413cb2.6
mov eax, dword [edi + 4]
mov edx, dword [ebp + 0xc]
mov dword [esi + 4], eax
mov eax, dword [edi]
mov dword [esi], eax
mov eax, dword [edi + 0x20]
mov dword [esi + 0x1c], eax
mov eax, dword [edi + 0x24]
mov dword [esi + 0x20], eax
mov eax, dword [edi + 0x74]
mov dword [esi + 0x184], eax
mov eax, dword [edi + 0x7c]
mov dword [esi + 0x188], eax
xor eax, eax
test edx, edx
setne al
lea eax, [eax*2 + 0x93]
mov dword [esi + 0x14], eax
mov eax, edx
neg eax
sbb eax, eax
and eax, 0xfffffffb
add eax, 5
mov dword [esi + 0x10], eax
mov ecx, dword [edi + 0x1c]
cmp ecx, 0x1b
ja case.0x413cb2.6
movzx eax, byte [ecx + 0x414120]
jmp dword [eax*4 + 0x4140e0]
mov dword [esi + 0xc], 0x25
jmp 0x413c63
xor eax, eax
cmp dword [edi + 0x80], eax
setne al
add eax, 0x26
mov dword [esi + 0xc], eax
jmp 0x413c63
mov dword [esi + 0xc], 5
jmp 0x413c63
mov dword [esi + 0xc], 3
jmp 0x413c63
mov dword [esi + 0xc], 4
jmp 0x413c63
mov dword [esi + 0xc], 1
jmp 0x413c63
mov dword [esi + 0xc], 2
jmp 0x413c63
mov dword [esi + 0xc], 0x20
jmp 0x413c63
mov dword [esi + 0xc], 0x3a
jmp 0x413c63
mov dword [esi + 0xc], 0x17
mov ecx, fcn.00410810
cmp dword [edi + 0x74], 0
jne 0x4138af
mov ecx, fcn.004107c0
cmp dword [edi + 8], 0
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], 0
jle 0x413c63
mov edx, 0x14
lea eax, [edi + 0x44]
mov dword [esp + 0x20], edx
mov dword [esp + 0x10], eax
mov edi, dword [esp + 0xc]
xor ebx, ebx
mov dword [esp + 0x1c], edx
nop
mov eax, dword [eax]
add eax, ebx
push edi
push eax
call ecx
mov edx, dword [esp + 0x24]
add ebx, 2
mov ecx, dword [esi + 0x190]
add esp, 8
mov word [edx + ecx], ax
add edx, 2
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x1c], edx
cmp ebx, 0x20
jl 0x4138e0
mov ecx, dword [esp + 0x18]
add eax, 4
mov edi, dword [esp + 0x24]
inc ecx
mov edx, dword [esp + 0x20]
add edx, 0x30c
mov dword [esp + 0x18], ecx
mov dword [esp + 0x10], eax
cmp ecx, dword [edi + 8]
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x20], edx
jl 0x4138d5
mov ebx, dword [esp + 0xc]
jmp 0x413c63
mov dword [esi + 0xc], 0x1b
cmp dword [edi + 8], 0
mov dword [esp + 0x1c], 0
jle 0x413c63
lea eax, [edi + 0x44]
mov dword [esp + 0x10], eax
mov eax, dword [eax]
cdq
push 4
push edx
push eax
lea eax, [esp + 0x20]
push eax
mov eax, dword [ebx]
push ebx
call eax
add esp, 0x14
cmp eax, 4
je 0x413982
or ebx, 0xffffffff
jmp 0x4139a5
mov eax, dword [esp + 0x14]
movzx ebx, al
shl ebx, 8
movzx eax, ah
or ebx, eax
movzx eax, byte [esp + 0x16]
shl ebx, 8
or ebx, eax
movzx eax, byte [esp + 0x17]
shl ebx, 8
or ebx, eax
mov eax, dword [esp + 0x10]
push 4
mov eax, dword [eax]
add eax, 4
cdq
push edx
push eax
lea eax, [esp + 0x24]
push eax
mov eax, dword [esp + 0x1c]
push eax
mov eax, dword [eax]
call eax
add esp, 0x14
cmp eax, 4
je 0x4139ce
or ecx, 0xffffffff
jmp 0x4139f1
mov eax, dword [esp + 0x18]
movzx ecx, al
shl ecx, 8
movzx eax, ah
or ecx, eax
movzx eax, byte [esp + 0x1a]
shl ecx, 8
or ecx, eax
movzx eax, byte [esp + 0x1b]
shl ecx, 8
or ecx, eax
push dword [esp + 0x1c]
mov eax, dword [esp + 0x14]
push ecx
push ebx
mov ebx, dword [esp + 0x18]
mov ecx, esi
mov eax, dword [eax]
mov edx, ebx
add eax, 8
push eax
call fcn.004e3af0
mov ecx, dword [esp + 0x2c]
add esp, 0x10
mov eax, dword [esp + 0x10]
inc ecx
add eax, 4
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x10], eax
cmp ecx, dword [edi + 8]
jl 0x413964
jmp 0x413c63
push 0x34
lea eax, [esp + 0x2c]
push 0
push eax
call fcn.00504370
mov edx, dword [ebp + 8]
add esp, 0xc
cmp dword [ebp + 0xc], 0
jne 0x413a5a
push edi
mov ecx, ebx
call fcn.00414b60
add esp, 4
mov edx, eax
test edx, edx
je case.0x413cb2.6
lea ecx, [esp + 0x28]
push ecx
push 6
push dword [edi + 8]
lea eax, [esi + 0xc]
mov ecx, ebx
push eax
call fcn.004e3d80
add esp, 0x10
mov dword [esi + 0x1a4], eax
test eax, eax
jne 0x413c63
mov ecx, esi
call fcn.00405c10
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x34
lea eax, [esp + 0x2c]
push 0
push eax
call fcn.00504370
mov edx, dword [ebp + 8]
add esp, 0xc
cmp dword [ebp + 0xc], 0
jne 0x413abb
push edi
mov ecx, ebx
call fcn.00414b60
add esp, 4
mov edx, eax
test edx, edx
je case.0x413cb2.6
lea ecx, [esp + 0x28]
push ecx
push 7
push dword [edi + 8]
lea eax, [esi + 0xc]
mov ecx, ebx
push eax
call fcn.004e3d80
add esp, 0x10
mov dword [esi + 0x1a4], eax
test eax, eax
je case.0x413cb2.6
jmp 0x413c63
cmp dword [edi + 0x78], 0
je 0x413b05
xor edx, edx
cmp dword [edi + 8], edx
jle 0x413b05
lea ecx, [edi + 0x5c]
mov eax, dword [edi + 0x2c]
lea ecx, [ecx + 4]
add dword [ecx - 4], eax
inc edx
cmp edx, dword [edi + 8]
jl 0x413af6
lea eax, [edi + 0x5c]
mov dword [esi + 0xc], 0x70
mov edx, dword [edi + 0x80]
mov ecx, dword [edi + 8]
push eax
push dword [edi + 0x20]
call fcn.004af6d0
add esp, 8
mov dword [esi + 0x1a4], eax
test eax, eax
je case.0x413cb2.6
jmp 0x413c63
test edx, edx
jne 0x413c38
mov eax, dword [ebp + 8]
mov dword [esp + 0x2c], eax
mov eax, dword [edi + 8]
mov dword [esp + 0x30], edx
mov dword [esp + 0x34], edx
mov dword [esp + 0x38], edx
mov dword [esp + 0x3c], edx
mov dword [esp + 0x48], edx
mov dword [esp + 0x4c], edx
mov dword [esp + 0x50], edx
mov dword [esp + 0x54], edx
mov dword [esp + 0x58], edx
mov dword [esp + 0x5c], edx
mov dword [esp + 0x60], edx
mov dword [esp + 0x64], edx
mov dword [esp + 0x68], edx
mov dword [esp + 0x6c], edx
mov dword [esp + 0x74], edx
mov dword [esp + 0x28], edx
mov dword [esp + 0x40], ecx
mov dword [esp + 0x44], eax
mov dword [esp + 0x70], 0x410a00
test ebx, ebx
jne 0x413ba1
xor ecx, ecx
jmp 0x413be5
push 0x20
push 1
call fcn.0050f2a0
mov ecx, eax
add esp, 8
test ecx, ecx
je 0x413be5
mov dword [ecx], 0x406f10
mov dword [ecx + 4], fcn.00406f30
mov dword [ecx + 8], 0x406f50
mov dword [ecx + 0xc], 0x406df0
mov dword [ecx + 0x10], 0x406f70
mov dword [ecx + 0x14], fcn.00406f90
mov eax, dword [ebx + 0x18]
mov dword [ecx + 0x18], eax
mov dword [ecx + 0x1c], ebx
lea edx, [esp + 0x28]
call fcn.004e4b10
mov dword [esp + 0x20], eax
test eax, eax
je case.0x413cb2.6
mov ecx, dword [eax + 4]
push eax
mov dword [ebp + 8], 0
call ecx
mov ecx, dword [esp + 0x24]
add esp, 4
xor edx, edx
mov dword [edi + 0x84], eax
push 0
call fcn.004e0070
mov dword [esi + 0x1a4], eax
add esp, 4
mov eax, dword [esp + 0x20]
push eax
mov eax, dword [eax + 0x14]
call eax
mov eax, dword [esi + 0x1a4]
jmp 0x413c4a
mov edx, dword [ebp + 8]
mov ecx, ebx
push 0
call fcn.004e0070
mov dword [esi + 0x1a4], eax
add esp, 4
test eax, eax
je case.0x413cb2.6
mov dword [esi + 0xc], 0x83
mov dword [esi + 0x10], 0
mov ecx, dword [ebp + 8]
mov edx, ebx
mov eax, dword [edi + 0x84]
push 1
mov dword [esp + 0x28], ecx
push ecx
mov ecx, esi
mov dword [esi + 0x40], eax
call fcn.004064d0
add esp, 8
test eax, eax
je case.0x413cb2.6
cmp dword [ebp + 0xc], 0
je 0x414008
test byte [edi + 0x7c], 4
mov eax, dword [esi + 0xc]
jne 0x413f13
dec eax
cmp eax, 0x6f
ja case.0x413cb2.6
movzx eax, byte [eax + 0x41415c]
jmp dword [eax*4 + 0x41413c]
xor edx, edx
cmp dword [esi + 8], edx
jle 0x4140d5
xor ebx, ebx
jmp 0x413cd0
mov ecx, dword [esi + 0x190]
lea ebx, [ebx + 0x30c]
mov eax, dword [edi + 0x2c]
inc edx
mov dword [ebx + ecx - 0x304], eax
cmp edx, dword [esi + 8]
jl 0x413cd0
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, 0x92492493
imul dword [edi]
add edx, dword [edi]
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
xor edx, edx
mov dword [esp + 0x24], eax
cmp dword [esi + 8], edx
jle 0x4140d5
xor ebx, ebx
lea esp, [esp]
imul eax, edx
lea ebx, [ebx + 0x30c]
inc edx
imul eax, dword [edi + 0x2c]
mov ecx, eax
shl ecx, 4
sub ecx, eax
mov eax, dword [esi + 0x190]
mov dword [ebx + eax - 0x304], ecx
mov eax, dword [esp + 0x24]
cmp edx, dword [esi + 8]
jl 0x413d20
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor eax, eax
cmp dword [edi + 0x14], 8
setne al
xor edx, edx
inc eax
mov dword [esp + 0x24], eax
cmp dword [esi + 8], edx
jle 0x4140d5
xor ebx, ebx
xor eax, eax
mov dword [esp + 0x20], eax
mov ecx, dword [edi + 0x2c]
lea ebx, [ebx + 0x30c]
add ecx, eax
inc edx
mov eax, dword [esi + 0x190]
mov dword [ebx + eax - 0x304], ecx
mov eax, dword [esp + 0x20]
add eax, dword [esp + 0x24]
mov dword [esp + 0x20], eax
cmp edx, dword [esi + 8]
jl 0x413d75
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor eax, eax
cmp dword [edi + 0x14], 8
setne al
xor edx, edx
inc eax
imul eax, dword [edi]
mov dword [esp + 0x24], eax
cmp dword [esi + 8], edx
jle 0x4140d5
xor ebx, ebx
xor eax, eax
mov dword [esp + 0x20], eax
lea esp, [esp]
mov ecx, dword [edi + 0x2c]
lea ebx, [ebx + 0x30c]
add ecx, eax
inc edx
mov eax, dword [esi + 0x190]
mov dword [ebx + eax - 0x304], ecx
mov eax, dword [esp + 0x20]
add eax, dword [esp + 0x24]
mov dword [esp + 0x20], eax
cmp edx, dword [esi + 8]
jl 0x413dd0
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, 0x92492493
mov dword [esp + 0x20], 0
imul dword [edi]
add edx, dword [edi]
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
shl eax, 4
cmp dword [esi + 8], 0
mov dword [esp + 0x24], eax
jle 0x4140d5
xor edx, edx
xor ebx, ebx
jmp 0x413e40
mov eax, dword [esi + 0x190]
lea edx, [edx + 0x30c]
mov ecx, dword [edi + 0x2c]
add ecx, ebx
add ebx, dword [esp + 0x24]
mov dword [edx + eax - 0x304], ecx
mov eax, dword [esp + 0x20]
inc eax
mov dword [esp + 0x20], eax
cmp eax, dword [esi + 8]
jl 0x413e40
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [edi + 0x28]
xor edx, edx
mov dword [esp + 0x24], eax
cmp dword [esi + 8], edx
jle 0x4140d5
xor ebx, ebx
xor eax, eax
mov dword [esp + 0x20], eax
lea ecx, [ecx]
mov ecx, dword [edi + 0x2c]
lea ebx, [ebx + 0x30c]
add ecx, eax
inc edx
mov eax, dword [esi + 0x190]
mov dword [ebx + eax - 0x304], ecx
mov eax, dword [esp + 0x20]
add eax, dword [esp + 0x24]
mov dword [esp + 0x20], eax
cmp edx, dword [esi + 8]
jl 0x413e90
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [edi + 0x28]
xor edx, edx
mov dword [esp + 0x24], eax
cmp dword [esi + 8], edx
jle 0x4140d5
xor ebx, ebx
xor eax, eax
mov dword [esp + 0x20], eax
lea ecx, [ecx]
mov ecx, dword [edi + 0x2c]
lea ebx, [ebx + 0x30c]
add ecx, eax
inc edx
mov eax, dword [esi + 0x190]
mov dword [ebx + eax - 0x304], ecx
mov eax, dword [esp + 0x20]
add eax, dword [esp + 0x24]
mov dword [esp + 0x20], eax
cmp edx, dword [esi + 8]
jl 0x413ee0
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp eax, 0x17
jne 0x413f83
cmp dword [esi + 8], 1
jle 0x413f83
mov eax, dword [edi + 0x2c]
cmp eax, dword [edi + 0x30]
jne 0x413f83
mov eax, 0x92492493
xor ebx, ebx
imul dword [edi]
add edx, dword [edi]
sar edx, 3
mov eax, edx
shr eax, 0x1f
add eax, edx
xor edx, edx
shl eax, 3
mov dword [esp + 0x24], eax
xor eax, eax
mov dword [esp + 0x20], eax
lea ebx, [ebx]
mov ecx, dword [edi + 0x2c]
lea ebx, [ebx + 0x30c]
add ecx, eax
inc edx
mov eax, dword [esi + 0x190]
mov dword [ebx + eax - 0x304], ecx
mov eax, dword [esp + 0x20]
add eax, dword [esp + 0x24]
mov dword [esp + 0x20], eax
cmp edx, dword [esi + 8]
jl 0x413f50
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [edi + 0xc], 5
jne 0x413fcc
test dword [edi + 0x28], 0x100
je 0x413fcc
xor edx, edx
cmp dword [esi + 8], edx
jle 0x4140d5
xor ebx, ebx
add edi, 0x2c
mov ecx, dword [edi]
lea edi, [edi + 4]
mov eax, dword [esi + 0x190]
lea ebx, [ebx + 0x30c]
add ecx, 0x10
inc edx
mov dword [ebx + eax - 0x304], ecx
cmp edx, dword [esi + 8]
jl 0x413fa2
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor edx, edx
cmp dword [esi + 8], edx
jle 0x4140d5
xor ebx, ebx
add edi, 0x2c
lea esp, [esp]
mov ecx, dword [esi + 0x190]
lea edi, [edi + 4]
mov eax, dword [edi - 4]
lea ebx, [ebx + 0x30c]
inc edx
mov dword [ebx + ecx - 0x304], eax
cmp edx, dword [esi + 8]
jl 0x413fe0
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor edi, edi
cmp dword [esi + 0x10], 5
jne 0x4140d5
cmp dword [esi + 0x40], edi
jne 0x4140d5
mov eax, dword [ebx + 4]
push ebx
call eax
mov ecx, dword [ebp + 8]
add esp, 4
mov dword [esp + 0x20], eax
mov dword [esi + 0x164], ecx
cmp ecx, eax
jae 0x4140c8
mov eax, dword [esp + 0x24]
nop
mov edx, esi
mov ecx, eax
call fcn.004dae50
cmp dword [esi + 0x160], 0
jl 0x4140c8
mov eax, dword [esi + 0x158]
cdq
push 4
push edx
push eax
lea eax, [esp + 0x28]
push eax
mov eax, dword [ebx]
push ebx
call eax
add esp, 0x14
cmp eax, 4
jne 0x41409e
mov eax, dword [esp + 0x1c]
movzx ecx, al
shl ecx, 8
movzx eax, ah
or ecx, eax
movzx eax, byte [esp + 0x1e]
shl ecx, 8
or ecx, eax
movzx eax, byte [esp + 0x1f]
shl ecx, 8
or ecx, eax
cmp ecx, 0x5343456c
je 0x4140c8
cmp dword [esi + 0x160], 0
jle 0x4140b8
mov eax, dword [esi + 0x190]
mov ecx, dword [esi + 0x164]
sub ecx, dword [eax + 8]
add edi, ecx
mov eax, dword [esi + 0x164]
cmp eax, dword [esp + 0x20]
jb 0x414040
mov ecx, dword [ebp + 8]
mov edx, esi
call fcn.004dae50
mov dword [esi + 0x40], edi
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret