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

Disassembly:
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
cmp esp, dword [ecx + 8]
jbe 0x4136b7
sub esp, 0x74
mov edx, dword [esp + 0x84]
movzx ebx, byte [edx + 0xf]
mov ebp, dword [esp + 0x78]
mov esi, ebp
shr ebp, 2
and ebp, 0x1f
mov edi, ebp
shl ebp, 2
mov eax, esi
sub esi, ebp
test bl, 0x40
jne 0x41321d
mov ebx, dword [edx + 4]
shr ebx, 2
mov ebp, dword [edx]
mov ecx, ebx
mov ebx, dword [esp + 0x80]
cmp ebx, ebp
je 0x4131d2
mov dword [esp + 0x5c], ebp
shr ebp, 2
cmp ebp, 0x20
ja 0x4131b9
mov dword [esp + 0x28], ebp
mov ebp, dword [esp + 0x5c]
test ebp, ebp
je 0x4136b1
mov edx, dword [edx + 0x14]
mov dword [esp + 0x60], edx
mov eax, ebx
xor edx, edx
div ebp
mov edx, dword [esp + 0x60]
mov edx, dword [edx]
mov ebp, dword [esp + 0x28]
mov ebx, edi
xor edi, edi
mov dword [esp + 0x50], edi
mov edi, ebx
jmp 0x413591
mov dword [esp + 0x5c], ecx
mov ebp, edi
xor edi, edi
mov dword [esp + 0x50], edi
xor edi, edi
mov dword [esp + 0x44], edi
mov edi, ebp
jmp 0x4134b6
cmp ecx, 0x20
jbe 0x4131e3
mov edx, dword [edx + 0x14]
xor ebx, ebx
mov ebp, edi
jmp 0x4133df
mov eax, dword [edx + 0x14]
mov eax, dword [eax]
mov dword [esp], esi
mov dword [esp + 4], 0
mov dword [esp + 8], edi
mov dword [esp + 0xc], edi
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], ecx
call fcn.00412d20
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x20]
mov ebx, dword [esp + 0x24]
jmp 0x4133a2
mov dword [esp + 0x5c], edi
mov dword [esp + 0x54], esi
mov dword [esp + 0x70], eax
mov ebx, dword [edx + 0x14]
add ebx, 4
mov dword [esp], ebx
mov dword [esp + 4], eax
call fcn.004137a0
mov eax, dword [esp + 8]
mov dword [esp + 0x34], eax
mov ecx, dword [esp + 0x5c]
mov edx, ecx
xor ebx, ebx
mov ebp, dword [esp + 0x54]
xor esi, esi
jmp 0x413298
mov dword [esp], edi
mov dword [esp + 4], eax
mov dword [esp + 8], ecx
mov dword [esp + 0xc], ebp
mov eax, dword [esp + 0x34]
shl eax, 2
sub ebx, eax
mov dword [esp + 0x10], ebx
call fcn.00412e70
mov eax, dword [esp + 0x84]
mov ecx, dword [eax]
mov edx, dword [esp + 0x48]
lea esi, [edx + ecx]
mov ebp, dword [esp + 0x14]
mov ebx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x20]
mov eax, dword [esp + 0x34]
mov dword [esp + 0x48], esi
mov edi, eax
mov eax, dword [esp + 0x70]
mov dword [esp + 0x6c], eax
mov eax, edi
jmp 0x413356
mov esi, dword [esp + 0x6c]
movzx esi, byte [esi]
mov dword [esp], ebp
mov dword [esp + 4], ebx
mov dword [esp + 8], edx
mov dword [esp + 0xc], ecx
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], eax
call fcn.00412d20
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x84]
mov ebx, dword [edx]
mov ebp, dword [esp + 0x48]
lea esi, [ebp + ebx]
mov edi, dword [esp + 0x18]
mov ebp, dword [esp + 0x24]
mov edx, dword [esp + 0x80]
cmp edx, esi
jne 0x413253
jmp 0x413360
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x6c]
movzx esi, byte [eax]
mov dword [esp], ebp
mov dword [esp + 4], ebx
mov dword [esp + 8], edx
mov dword [esp + 0xc], ecx
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], 8
call fcn.00412d20
nop
mov eax, dword [esp + 0x40]
add eax, 0xfffffff8
mov ebp, dword [esp + 0x18]
mov ebx, dword [esp + 0x1c]
mov edx, dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
mov esi, dword [esp + 0x6c]
inc esi
mov edi, dword [esp + 0x34]
mov dword [esp + 0x6c], esi
mov esi, dword [esp + 0x48]
cmp eax, 8
ja 0x413302
jmp 0x4132ad
mov dword [esp], edi
mov dword [esp + 4], eax
mov dword [esp + 8], ecx
mov dword [esp + 0xc], ebp
mov eax, dword [esp + 0x78]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x7c]
mov dword [esp + 0x14], eax
call fcn.00412f60
mov eax, dword [esp + 0x70]
mov dword [esp], eax
mov eax, dword [esp + 0x34]
add eax, 7
shr eax, 3
mov dword [esp + 4], eax
call fcn.00465fa0
add esp, 0x74
ret
mov dword [esp], eax
mov dword [esp + 4], ecx
mov dword [esp + 8], edx
mov dword [esp + 0xc], ebx
mov eax, dword [esp + 0x78]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x7c]
mov dword [esp + 0x14], eax
call fcn.00412f60
add esp, 0x74
ret
mov esi, eax
mov eax, dword [esp + 0x68]
add eax, 4
mov edi, edx
mov edx, eax
mov eax, ebx
mov ebx, ecx
mov ecx, ebp
mov ebp, eax
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x68], edx
mov eax, dword [edx]
mov dword [esp], esi
mov dword [esp + 4], ebx
mov dword [esp + 8], edi
mov dword [esp + 0xc], ebp
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], 0x20
call fcn.00412d20
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x20]
mov ebx, dword [esp + 0x24]
nop
mov ebp, dword [esp + 0x2c]
add ebp, 0xffffffe0
cmp ebp, 0x20
ja 0x4133ca
nop
mov esi, dword [esp + 0x68]
mov esi, dword [esi + 4]
mov dword [esp], eax
mov dword [esp + 4], ecx
mov dword [esp + 8], edx
mov dword [esp + 0xc], ebx
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], ebp
call fcn.00412d20
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x20]
mov ebx, dword [esp + 0x24]
jmp 0x4133a2
mov esi, dword [ebp + 4]
mov dword [esp], eax
mov dword [esp + 4], ecx
mov dword [esp + 8], edx
mov dword [esp + 0xc], ebx
mov eax, dword [esp + 0x58]
sub eax, esi
mov dword [esp + 0x10], eax
call fcn.00412e70
mov edx, dword [esp + 0x84]
mov eax, dword [edx]
mov ecx, dword [esp + 0x44]
add eax, ecx
mov esi, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
mov ebp, dword [esp + 0x1c]
mov edi, dword [esp + 0x20]
mov ebx, dword [esp + 0x80]
mov dword [esp + 0x50], ecx
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x78]
mov ecx, dword [esp + 0x5c]
mov eax, dword [edx + 0x14]
jmp 0x413579
mov eax, dword [eax]
mov dword [esp], esi
mov edx, dword [esp + 0x50]
mov dword [esp + 4], edx
mov dword [esp + 8], ebp
mov dword [esp + 0xc], edi
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], ecx
call fcn.00412d20
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x20]
mov ebx, dword [esp + 0x24]
mov ebp, dword [esp + 0x84]
mov esi, dword [ebp]
mov dword [esp + 0x58], esi
mov edi, dword [esp + 0x44]
add edi, esi
mov esi, dword [esp + 0x80]
cmp esi, edi
jne 0x41345f
jmp 0x4133a2
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x64], eax
mov ecx, dword [eax]
mov dword [esp], esi
mov edx, dword [esp + 0x50]
mov dword [esp + 4], edx
mov dword [esp + 8], ebp
mov dword [esp + 0xc], edi
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], 0x20
call fcn.00412d20
nop
mov eax, dword [esp + 0x3c]
lea ecx, [eax - 0x20]
mov esi, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
mov ebp, dword [esp + 0x20]
mov edi, dword [esp + 0x24]
mov edx, dword [esp + 0x64]
add edx, 4
mov ebx, dword [esp + 0x80]
mov dword [esp + 0x50], eax
mov eax, edx
mov edx, dword [esp + 0x84]
cmp ecx, 0x20
ja 0x413518
jmp 0x4134be
mov ebp, dword [esp + 0x50]
mov ebp, ecx
mov ecx, edx
mov edx, ebx
mov ebx, dword [esp + 0x4c]
cmp ebp, 0x10
ja 0x413620
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x38], edx
test eax, 1
je 0x4135f5
mov dword [esp + 0x58], ebp
mov dword [esp + 0x30], eax
mov dword [esp], esi
mov eax, dword [esp + 0x50]
mov dword [esp + 4], eax
mov dword [esp + 8], ebx
mov dword [esp + 0xc], edi
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], ebp
call fcn.00412d20
mov esi, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
mov ebx, dword [esp + 0x20]
mov edi, dword [esp + 0x24]
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x38]
mov ebp, dword [esp + 0x58]
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x30]
mov dword [esp + 0x4c], ebx
shr eax, 1
mov ecx, ebp
shl edx, cl
mov ebx, dword [esp + 0x38]
or ebx, edx
mov edx, dword [esp + 0x2c]
add edx, ecx
shl ecx, 1
cmp eax, 1
jne 0x413583
mov ebp, ecx
mov ecx, edx
mov edx, ebx
mov ebx, dword [esp + 0x4c]
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x38], edx
mov dword [esp + 0x28], ebp
jmp 0x413677
mov dword [esp + 0x30], eax
mov dword [esp], esi
mov eax, dword [esp + 0x50]
mov dword [esp + 4], eax
mov dword [esp + 8], ebx
mov dword [esp + 0xc], edi
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], ebp
call fcn.00412d20
mov eax, dword [esp + 0x30]
dec eax
mov esi, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
mov ebx, dword [esp + 0x20]
mov edi, dword [esp + 0x24]
mov edx, dword [esp + 0x38]
mov ebp, dword [esp + 0x28]
mov dword [esp + 0x50], ecx
mov ecx, dword [esp + 0x2c]
cmp eax, 1
ja 0x41362e
mov dword [esp], esi
mov eax, dword [esp + 0x50]
mov dword [esp + 4], eax
mov dword [esp + 8], ebx
mov dword [esp + 0xc], edi
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], ecx
call fcn.00412d20
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x20]
mov ebx, dword [esp + 0x24]
jmp 0x4133a2
call fcn.004358e0
nop
call fcn.004643a0
jmp fcn.00413120