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

Disassembly:
sub esp, 0x58
mov eax, dword [0x490004]
xor eax, esp
mov dword [esp + 0x54], eax
mov eax, dword [esp + 0x60]
push ebx
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x68]
push ebp
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x74]
push esi
mov dword [esp + 0x38], eax
xor eax, eax
push edi
mov edi, ecx
mov dword [esp + 0x14], eax
mov esi, eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x44], edx
movzx ecx, word [edi + 0x42]
mov ebx, dword [edi + 0x44]
mov eax, ecx
and eax, 1
and ecx, 0xfe00
shl eax, 0x10
add eax, ecx
mov dword [esp + 0x20], eax
mov eax, dword [edi + 0x20]
mov ebp, dword [eax]
cmp dword [ebp + 0x60], ebx
jae 0x410c3a
mov eax, dword [edi + 0x48]
lea ecx, [ebp + 0x68]
mov dword [esp + 0x38], eax
xor eax, eax
inc eax
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x18], eax
mov edx, dword [ecx]
mov dword [esp + 0x30], edx
cmp ebx, edx
jbe 0x410a45
mov edx, dword [esp + 0x24]
add eax, 3
push 1
push eax
push dword [esp + 0x34]
mov ecx, edi
mov dword [esp + 0x4c], eax
call fcn.004108d4
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x410a2b
mov eax, dword [esp + 0x1c]
or ecx, 0xffffffff
cmp dword [esp + 0x18], 1
mov edx, dword [esp + 0x40]
cmove ecx, ebx
mov dword [eax], ecx
mov ecx, edi
push 1
call fcn.0040fea3
pop ecx
jmp 0x410a3d
cmp esi, 5
jne 0x410cd8
mov ebx, dword [esp + 0x30]
and dword [esp + 0x24], 0
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
inc eax
add ecx, 4
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], ecx
cmp eax, 5
jl 0x4109de
cmp dword [ebp + 0x60], ebx
jae 0x410c27
mov edx, dword [ebp + 0x60]
lea eax, [esp + 0x14]
push eax
mov ecx, edi
call fcn.0041074c
cmp dword [esp + 0x18], 0
mov esi, eax
pop ecx
je 0x410c27
mov edx, dword [esp + 0x24]
mov ecx, edi
push 1
push 3
push dword [esp + 0x34]
call fcn.004108d4
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x410c27
mov eax, dword [ebp + 0x60]
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x78]
sar eax, 2
and eax, 3
mov dword [ebp + 0x80], ebx
mov ecx, dword [edi + 8]
mov edx, eax
mov dword [esp + 0x78], eax
call fcn.0040428c
mov esi, eax
test esi, esi
jne 0x410c1a
push eax
push dword [esp + 0x24]
push eax
push dword [esp + 0x44]
call fcn.00475440
mov dword [esp + 0x48], eax
mov eax, dword [edi + 4]
mov dword [esp + 0x4c], edx
lea edx, [esp + 0x58]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x18]
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x410c1a
mov eax, dword [esp + 0x5c]
cmp eax, dword [esp + 0x4c]
jg 0x410b29
jl 0x410b12
mov eax, dword [esp + 0x58]
cmp eax, dword [esp + 0x48]
jae 0x410b29
mov eax, dword [edi + 4]
mov ecx, dword [eax]
test ecx, ecx
je 0x410b29
lea edx, [esp + 0x48]
push edx
push 5
push eax
call dword [ecx + 0x28]
add esp, 0xc
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x34]
push eax
lea edx, [esp + 0x2c]
call fcn.004104c0
pop ecx
test eax, eax
jne 0x410bd9
mov eax, dword [esp + 0x44]
cmp dword [eax + 0x108], 0
jne 0x410bca
mov ecx, dword [esp + 0x34]
cmp ecx, dword [esp + 0x30]
jbe 0x410bc0
cmp ecx, ebx
ja 0x410bc0
mov eax, dword [esp + 0x38]
cmp dword [esp + 0x28], eax
ja 0x410bc0
mov esi, dword [esp + 0x20]
dec ecx
lea eax, [esi + 0x18]
mul ecx
mov ecx, dword [edi + 8]
add eax, 0x38
adc edx, 0
push edx
mov edx, dword [esp + 0x40]
push eax
push esi
call fcn.0040424c
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x410c1a
mov eax, dword [esp + 0x28]
push esi
mov esi, dword [esp + 0x24]
dec eax
push esi
push 0
push eax
call fcn.00475440
mov ecx, dword [edi + 4]
push edx
mov edx, dword [esp + 0x40]
push eax
push esi
call fcn.00404263
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x410c1a
test esi, esi
je 0x410b29
jmp 0x410c1a
cmp byte [eax + 0x51], 0
push 9
pop esi
push 7
pop ecx
cmovne esi, ecx
jmp 0x410c1a
mov eax, dword [edi + 0x20]
mov eax, dword [eax]
cmp ebx, dword [eax + 0x10]
jne 0x410c17
push 0
push dword [esp + 0x24]
push 0
push dword [edi + 0x48]
call fcn.00475440
mov ecx, dword [edi + 4]
push edx
push eax
call fcn.0040427a
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x410c1a
mov edx, dword [esp + 0x78]
mov ecx, dword [edi + 4]
call fcn.0040428c
mov esi, eax
test esi, esi
jne 0x410c1a
mov dword [ebp + 0x60], ebx
push 1
push 3
pop edx
mov ecx, edi
call fcn.0040fea3
pop ecx
mov eax, esi
cmp esi, 5
je 0x410c32
test eax, eax
jne 0x410ca5
xor esi, esi
cmp eax, 5
cmovne esi, eax
mov ebx, dword [esp + 0x6c]
test ebx, ebx
je 0x410ca5
mov eax, dword [ebp + 0x60]
cmp eax, dword [edi + 0x44]
jae 0x410c4f
push 5
pop esi
jmp 0x410ca5
cmp ebx, 2
jl 0x410ca5
lea eax, [esp + 0x54]
push eax
push 4
pop ebp
push ebp
call fcn.004065c2
mov edx, dword [esp + 0x2c]
mov ecx, edi
push ebp
push ebp
push dword [esp + 0x3c]
call fcn.004108d4
mov esi, eax
add esp, 0x14
test esi, esi
jne 0x410ca5
cmp ebx, 3
jne 0x410c9a
mov edx, dword [esp + 0x54]
mov ecx, edi
call fcn.00410907
mov ecx, dword [edi + 8]
push esi
push esi
call fcn.0040427a
pop ecx
pop ecx
mov esi, eax
push ebp
mov edx, ebp
mov ecx, edi
call fcn.0040fea3
pop ecx
mov edi, dword [esp + 0x14]
test edi, edi
je 0x410cd8
cmp dword [0x490960], 0
je 0x410ccd
push edi
call dword [0x49098c]
sub dword [0x4929e8], eax
dec dword [0x492a0c]
pop ecx
push edi
jmp 0x410cd1
push dword [esp + 0x14]
call dword [0x490984]
pop ecx
mov ecx, dword [esp + 0x64]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004614f6
add esp, 0x58
ret