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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14
mov eax, dword [0x549944]
xor eax, esp
mov dword [esp + 0x10], eax
push ebx
mov ebx, ecx
push esi
push edi
mov edi, edx
xor esi, esi
mov eax, dword [ebx + 0x28]
mov dword [esp + 0x14], edi
test eax, eax
jne 0x413ac3
mov eax, dword [0x54a51c]
test eax, eax
je 0x413768
push 0x190
call eax
add esp, 4
test eax, eax
je 0x413768
lea eax, [esi + 0xa]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x10]
xor ecx, esp
call fcn.004e5962
mov esp, ebp
pop ebp
ret
cmp byte [ebx + 0x10], 3
jae 0x413782
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x10]
xor ecx, esp
call fcn.004e5962
mov esp, ebp
pop ebp
ret
mov edx, 1
mov ecx, ebx
call fcn.0040f890
test eax, eax
jne 0x4137b3
mov eax, dword [ebx + 0x58]
test eax, eax
je 0x413ab4
nop dword [eax]
mov dword [eax + 0x10], 1
mov eax, dword [eax + 0x2c]
test eax, eax
jne 0x4137a0
jmp 0x413ab4
cmp dword [ebx + 0xd4], esi
je 0x41388d
mov edx, dword [ebx + 0xd0]
mov ecx, dword [edx]
test ecx, ecx
je 0x4137de
nop dword [eax + eax]
mov eax, dword [ecx + 0x20]
mov dword [ecx + 0x10], eax
mov ecx, eax
test ecx, ecx
jne 0x4137d0
mov ecx, dword [edx]
call fcn.0040d860
mov dword [esp + 0x18], esi
test eax, eax
jne 0x413806
push eax
lea eax, [esp + 0x1c]
push eax
mov eax, dword [ebx + 0xc8]
push 1
push ebx
call eax
mov eax, dword [esp + 0x28]
add esp, 0x10
mov dword [eax + 0x10], esi
push 1
push dword [ebx + 0x18]
mov edx, eax
mov ecx, ebx
call fcn.00410ab0
mov edx, dword [esp + 0x20]
add esp, 8
mov esi, eax
mov dword [esp + 0x10], esi
test edx, edx
je 0x413875
test byte [edx + 0x1c], 0x20
je 0x41386e
mov eax, dword [edx + 0x14]
dec dword [eax + 0x78]
mov ecx, dword [eax + 0x88]
mov dword [edx + 0x10], ecx
mov esi, dword [eax + 0x3c]
mov dword [eax + 0x88], edx
push dword [edx + 4]
mov ecx, dword [edx + 0x18]
mov eax, dword [eax + 0x98]
dec ecx
mov edi, dword [esi]
cdq
push edx
push eax
push 0
push ecx
call fcn.004e59d0
push edx
push eax
mov eax, dword [edi + 0x48]
push esi
call eax
mov esi, dword [esp + 0x20]
add esp, 0x10
jmp 0x413875
mov ecx, edx
call fcn.0040d5a0
test esi, esi
jne 0x413ac1
mov ecx, dword [ebx + 0xd0]
call fcn.0040d6c0
jmp 0x413ab4
xor esi, esi
cmp byte [ebx + 0x12], 0
jne 0x4139b1
cmp dword [ebx + 0x18], esi
jbe 0x4139b1
push esi
lea eax, [esp + 0x1c]
push eax
mov eax, dword [ebx + 0xc8]
push 1
push ebx
call eax
mov esi, eax
add esp, 0x10
mov dword [esp + 0x10], esi
test esi, esi
jne 0x413955
mov edx, dword [esp + 0x18]
test byte [edx + 0x1c], 4
mov ecx, dword [edx + 0x14]
je 0x4138f5
mov eax, dword [ecx + 0x18]
cmp eax, dword [edx + 0x18]
jb 0x4138f5
cmp dword [ecx + 0x60], esi
je 0x4138ed
mov ecx, edx
call fcn.004118e0
mov esi, eax
mov dword [esp + 0x10], esi
jmp 0x413928
xor esi, esi
mov dword [esp + 0x10], esi
jmp 0x413930
mov esi, dword [ecx + 0x28]
mov dword [esp + 0x10], esi
test esi, esi
jne 0x413959
mov eax, dword [ecx + 0x94]
cmp eax, dword [ecx + 0x98]
mov ecx, edx
jbe 0x41391d
call fcn.00413410
mov esi, eax
mov dword [esp + 0x10], esi
jmp 0x413928
call fcn.00413340
mov esi, eax
mov dword [esp + 0x10], eax
test esi, esi
jne 0x413955
mov edx, dword [esp + 0x18]
mov eax, dword [edx + 0x14]
mov ecx, dword [eax + 0x68]
mov eax, dword [edx + 4]
bswap ecx
inc ecx
bswap ecx
mov dword [eax + 0x18], ecx
mov eax, dword [edx + 4]
mov dword [eax + 0x5c], ecx
mov eax, dword [edx + 4]
mov dword [eax + 0x60], 0xc8182e00
mov byte [ebx + 0x12], 1
mov edx, dword [esp + 0x18]
test edx, edx
je 0x4139b1
test byte [edx + 0x1c], 0x20
je 0x4139aa
mov eax, dword [edx + 0x14]
dec dword [eax + 0x78]
mov ecx, dword [eax + 0x88]
mov dword [edx + 0x10], ecx
mov esi, dword [eax + 0x3c]
mov dword [eax + 0x88], edx
push dword [edx + 4]
mov ecx, dword [edx + 0x18]
mov eax, dword [eax + 0x98]
dec ecx
mov edi, dword [esi]
cdq
push edx
push eax
push 0
push ecx
call fcn.004e59d0
push edx
push eax
mov eax, dword [edi + 0x48]
push esi
call eax
mov esi, dword [esp + 0x20]
add esp, 0x10
mov edi, dword [esp + 0x14]
jmp 0x4139b1
mov ecx, edx
call fcn.0040d5a0
test esi, esi
jne 0x413ac1
mov edx, edi
mov ecx, ebx
call fcn.0040f2e0
mov esi, eax
test esi, esi
jne 0x413ac1
xor edx, edx
mov ecx, ebx
call fcn.00411530
mov esi, eax
test esi, esi
jne 0x413ac1
mov edx, dword [ebx + 0xd0]
mov ecx, dword [edx]
test ecx, ecx
je 0x4139fe
nop dword [eax + eax]
mov eax, dword [ecx + 0x20]
mov dword [ecx + 0x10], eax
mov ecx, eax
test ecx, ecx
jne 0x4139f0
mov ecx, dword [edx]
call fcn.0040d860
mov edx, eax
mov ecx, ebx
call fcn.00411770
mov esi, eax
test esi, esi
jne 0x413ac1
mov ecx, dword [ebx + 0xd0]
call fcn.0040d6c0
mov edi, dword [ebx + 0x18]
cmp edi, dword [ebx + 0x20]
jbe 0x413a4e
mov eax, dword [0x54b1cc]
xor ecx, ecx
cdq
idiv dword [ebx + 0x98]
inc eax
cmp edi, eax
sete cl
sub edi, ecx
mov ecx, ebx
mov edx, edi
call fcn.00410360
mov esi, eax
test esi, esi
jne 0x413ac1
cmp dword [ebp + 8], 0
jne 0x413ab4
xor eax, eax
mov dword [esp + 0x10], eax
mov eax, dword [ebx + 0x3c]
mov ecx, dword [eax]
test ecx, ecx
je 0x413a87
push dword [esp + 0x14]
push 0x15
push eax
mov eax, dword [ecx + 0x28]
call eax
add esp, 0xc
mov dword [esp + 0x10], eax
cmp eax, 0xc
jne 0x413a83
xor eax, eax
mov dword [esp + 0x10], eax
jmp 0x413a87
test eax, eax
jne 0x413aac
cmp byte [ebx + 7], 0
jne 0x413aac
movzx ecx, byte [ebx + 0xa]
mov edx, dword [ebx + 0x3c]
test ecx, ecx
je 0x413aa8
mov eax, dword [edx]
push ecx
push edx
mov eax, dword [eax + 0x14]
call eax
add esp, 8
mov esi, eax
jmp 0x413ab0
xor esi, esi
jmp 0x413ab0
mov esi, dword [esp + 0x10]
test esi, esi
jne 0x413ac1
cmp dword [ebx + 0xd4], 0
jne 0x413ac1
mov byte [ebx + 0x10], 5
mov eax, esi
mov ecx, dword [esp + 0x1c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004e5962
mov esp, ebp
pop ebp
ret