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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x24
mov eax, dword [0x549944]
xor eax, esp
mov dword [esp + 0x20], eax
push ebx
mov ebx, dword [ecx + 0x14]
xor edx, edx
mov dword [esp + 0x1c], ecx
push esi
push edi
mov eax, dword [ebx + 0x94]
xor edi, edi
div dword [ebx + 0x98]
or byte [ebx + 0x14], 4
mov ecx, dword [ecx + 0x18]
mov esi, eax
neg eax
mov dword [esp + 0x10], 0
lea edx, [ecx - 1]
and edx, eax
inc edx
mov dword [esp + 0x1c], edx
cmp ecx, dword [ebx + 0x18]
jbe 0x413469
sub ecx, edx
inc ecx
mov dword [esp + 0xc], ecx
jmp 0x413484
mov ecx, dword [ebx + 0x18]
lea eax, [esi - 1]
add eax, edx
cmp eax, ecx
jbe 0x41347e
sub ecx, edx
inc ecx
mov dword [esp + 0xc], ecx
jmp 0x413484
mov ecx, esi
mov dword [esp + 0xc], esi
mov dword [esp + 0x20], edi
test ecx, ecx
jle 0x4136f6
mov esi, edx
mov dword [esp + 0x18], edx
nop word [eax + eax]
cmp dword [esp + 0x10], 0
jne 0x4136f6
mov eax, dword [esp + 0x24]
cmp esi, dword [eax + 0x18]
je 0x413596
mov eax, dword [ebx + 0x38]
test eax, eax
je 0x413596
mov edx, esi
mov ecx, eax
call fcn.0040ce70
test eax, eax
je 0x413592
mov eax, dword [ebx + 0xd0]
push 0
push esi
push dword [eax + 0x2c]
call dword [0x54a4a4]
add esp, 0xc
test eax, eax
jne 0x4134f6
mov dword [esp + 0x28], eax
jmp 0x41361c
mov ecx, dword [eax + 4]
mov edx, dword [ebx + 0xd0]
mov dword [esp + 0x14], edx
cmp dword [ecx], 0
jne 0x41351b
mov ecx, dword [esp + 0x14]
mov edx, esi
push eax
call fcn.0040d520
add esp, 4
mov ecx, eax
jmp 0x413522
inc dword [edx + 0xc]
inc word [ecx + 0x1e]
mov dword [esp + 0x28], ecx
test ecx, ecx
je 0x41361c
movzx eax, word [ecx + 0x1c]
mov edx, 1
test al, 8
cmovne edi, edx
mov dword [esp + 0x14], edi
test al, 0x20
je 0x413617
mov edx, dword [ecx + 0x14]
dec dword [edx + 0x78]
mov eax, dword [edx + 0x88]
mov dword [ecx + 0x10], eax
mov esi, dword [edx + 0x3c]
mov eax, dword [edx + 0x98]
mov dword [edx + 0x88], ecx
push dword [ecx + 4]
mov ecx, dword [ecx + 0x18]
mov edi, dword [esi]
dec ecx
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 + 0x28]
add esp, 0x10
mov edi, dword [esp + 0x14]
jmp 0x41361c
mov ecx, dword [esp + 0xc]
mov eax, dword [0x54b1cc]
cdq
idiv dword [ebx + 0x98]
inc eax
cmp esi, eax
je 0x413620
push 0
lea eax, [esp + 0x2c]
push eax
mov eax, dword [ebx + 0xc8]
push esi
push ebx
call eax
mov ecx, eax
add esp, 0x10
mov dword [esp + 0x10], ecx
test ecx, ecx
jne 0x41361c
mov ecx, dword [esp + 0x28]
call fcn.00413340
mov edx, dword [esp + 0x28]
mov ecx, 1
mov dword [esp + 0x10], eax
movzx eax, word [edx + 0x1c]
test al, 8
cmovne edi, ecx
mov dword [esp + 0x14], edi
test al, 0x20
je 0x413615
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]
jmp 0x41356c
mov ecx, edx
call fcn.0040d5a0
mov ecx, dword [esp + 0xc]
mov eax, dword [esp + 0x20]
inc esi
inc eax
mov dword [esp + 0x18], esi
mov dword [esp + 0x20], eax
cmp eax, ecx
jl 0x4134a0
cmp dword [esp + 0x10], 0
jne 0x4136f6
test edi, edi
je 0x4136f6
mov esi, dword [esp + 0x1c]
nop dword [eax]
mov eax, dword [ebx + 0xd0]
push 0
push esi
push dword [eax + 0x2c]
call dword [0x54a4a4]
mov edx, eax
add esp, 0xc
test edx, edx
je 0x4136e6
mov eax, dword [edx + 4]
mov ecx, dword [ebx + 0xd0]
cmp dword [eax], 0
jne 0x413686
push edx
mov edx, esi
call fcn.0040d520
add esp, 4
jmp 0x41368d
inc dword [ecx + 0xc]
inc word [eax + 0x1e]
test eax, eax
je 0x4136e6
or word [eax + 0x1c], 8
test byte [eax + 0x1c], 0x20
je 0x4136df
mov edx, dword [eax + 0x14]
dec dword [edx + 0x78]
mov ecx, dword [edx + 0x88]
mov dword [eax + 0x10], ecx
mov esi, dword [edx + 0x3c]
mov dword [edx + 0x88], eax
push dword [eax + 4]
mov ecx, dword [eax + 0x18]
mov eax, dword [edx + 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 + 0x2c]
add esp, 0x10
jmp 0x4136e6
mov ecx, eax
call fcn.0040d5a0
inc esi
sub dword [esp + 0xc], 1
mov dword [esp + 0x1c], esi
jne 0x413650
and byte [ebx + 0x14], 0xfb
mov ecx, dword [esp + 0x2c]
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004e5962
mov esp, ebp
pop ebp
ret