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

Disassembly:
mov ecx, dword [0x98cddc]
mov ecx, dword fs:[ecx]
mov ecx, dword [ecx]
lea eax, [esp - 8]
cmp eax, dword [ecx + 8]
jbe 0x512cc3
sub esp, 0x88
mov eax, dword [esp + 0x90]
test eax, eax
je 0x5126f2
mov ecx, dword [esp + 0x94]
jmp 0x5126f9
mov ecx, dword [esp + 0xa0]
mov dword [esp + 0x48], ecx
mov edx, dword [esp + 0x8c]
mov ebx, dword [edx + 8]
mov ebx, dword [ebx + 0x10]
mov ebp, dword [esp + 0xa4]
cmp ebp, ebx
jg 0x512717
mov ebx, ebp
mov dword [esp + 0x74], ebx
lea eax, [0x6dd380]
mov dword [esp], eax
call fcn.0040bc10
mov eax, dword [esp + 4]
mov dword [esp + 0x84], eax
xor ecx, ecx
xor edx, edx
xor ebx, ebx
xor ebp, ebp
xor esi, esi
jmp 0x51275c
mov eax, dword [esp + 0x84]
mov ecx, edx
mov edx, dword [esp + 0x70]
mov ebx, dword [esp + 0x4c]
mov ebp, dword [esp + 0x80]
mov esi, dword [esp + 0x44]
mov dword [esp + 0x4c], ebx
mov edi, dword [esp + 0x48]
cmp edi, ecx
jl 0x512b11
mov dword [esp + 0x40], ecx
mov dword [esp + 0x50], edx
mov dword [esp + 0x78], ebp
mov dword [esp + 0x44], esi
mov edx, dword [esp + 0x8c]
mov dword [esp], edx
mov dword [esp + 4], 0
mov dword [esp + 8], 0
mov ebx, dword [esp + 0x90]
mov dword [esp + 0xc], ebx
mov ebp, dword [esp + 0x94]
mov dword [esp + 0x10], ebp
mov esi, dword [esp + 0x98]
mov dword [esp + 0x14], esi
mov edi, dword [esp + 0x9c]
mov dword [esp + 0x18], edi
mov edx, dword [esp + 0xa0]
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x74]
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], 0
mov dword [esp + 0x30], 2
call fcn.0050e580
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x3c]
test eax, eax
je 0x512af4
mov dword [esp + 0x58], ecx
mov dword [esp + 0x54], eax
mov ebx, dword [esp + 0x34]
mov dword [esp + 0x7c], ebx
mov ebp, dword [esp + 0x90]
test ebp, ebp
je 0x5128f3
mov esi, dword [ebx]
mov edx, dword [esp + 0x98]
cmp edx, esi
jb 0x512cbb
mov edi, dword [esp + 0x44]
cmp edi, esi
ja 0x512cb2
sub esi, edi
mov ecx, dword [esp + 0x4c]
lea ebx, [ecx + esi]
sub edx, edi
neg edx
sar edx, 0x1f
and edx, edi
add edx, ebp
mov ebp, dword [esp + 0x50]
cmp ebp, ebx
jb 0x51286b
mov dword [esp + 0x64], eax
mov eax, dword [esp + 0x78]
mov dword [esp + 0x80], eax
jmp 0x5128be
mov dword [esp + 0x70], esi
mov dword [esp + 0x80], edx
mov eax, dword [esp + 0x78]
mov dword [esp], eax
mov dword [esp + 4], ebx
mov dword [esp + 8], ebp
mov dword [esp + 0xc], esi
lea eax, [0x6e06e0]
mov dword [esp + 0x10], eax
call fcn.0046cad0
mov ebp, dword [esp + 0x14]
mov ebx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x4c]
mov esi, dword [esp + 0x70]
mov eax, edx
mov edx, dword [esp + 0x80]
mov dword [esp + 0x80], ebp
mov ebp, eax
mov dword [esp + 0x70], ebp
mov dword [esp + 0x4c], ebx
mov eax, dword [esp + 0x80]
add ecx, eax
mov dword [esp], ecx
mov dword [esp + 4], edx
mov dword [esp + 8], esi
call fcn.00472440
mov eax, dword [esp + 0x70]
mov ecx, dword [esp + 0x4c]
mov edx, dword [esp + 0x80]
jmp 0x5129cb
mov esi, dword [ebx]
mov edx, dword [esp + 0xa0]
cmp edx, esi
jb 0x512cab
mov edi, dword [esp + 0x44]
cmp edi, esi
ja 0x512ca2
sub esi, edi
mov dword [esp + 0x70], esi
mov edx, dword [esp + 0x4c]
lea ecx, [edx + esi]
xchg esi, ebx
neg ebx
xchg esi, ebx
sar esi, 0x1f
and esi, edi
mov ebp, dword [esp + 0x9c]
add esi, ebp
mov ebp, dword [esp + 0x50]
cmp ebp, ecx
jb 0x51294a
mov dword [esp + 0x5c], eax
mov eax, dword [esp + 0x78]
mov dword [esp + 0x80], eax
jmp 0x512997
mov dword [esp + 0x80], esi
mov eax, dword [esp + 0x78]
mov dword [esp], eax
mov dword [esp + 4], ecx
mov dword [esp + 8], ebp
mov eax, dword [esp + 0x70]
mov dword [esp + 0xc], eax
lea ecx, [0x6e06e0]
mov dword [esp + 0x10], ecx
call fcn.0046cad0
mov ebp, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
mov esi, dword [esp + 0x80]
mov dword [esp + 0x80], ebp
mov ebp, edx
mov edx, dword [esp + 0x4c]
mov dword [esp + 0x6c], ebp
mov dword [esp + 0x4c], ecx
mov eax, dword [esp + 0x80]
add edx, eax
mov dword [esp], edx
mov dword [esp + 4], esi
mov edx, dword [esp + 0x70]
mov dword [esp + 8], edx
call fcn.00472440
mov eax, dword [esp + 0x6c]
mov ecx, dword [esp + 0x4c]
mov edx, dword [esp + 0x80]
mov ebx, dword [esp + 0x54]
cmp ebx, 1
jbe 0x512c96
mov ebp, dword [esp + 0x44]
mov esi, dword [esp + 0x7c]
cmp dword [esi + 4], ebp
jg 0x5129eb
mov ebp, dword [esi]
test ebp, ebp
jne 0x512a2f
mov ebp, dword [esp + 0xa8]
mov edi, dword [ebp]
mov dword [esp], edx
mov dword [esp + 4], ecx
mov dword [esp + 8], eax
mov dword [esp + 0xc], esi
mov dword [esp + 0x10], ebx
mov eax, dword [esp + 0x58]
mov dword [esp + 0x14], eax
mov edx, ebp
call edi
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x20]
mov ebx, dword [esp + 0x90]
test ebx, ebx
mov esi, dword [esp + 0x7c]
jmp 0x512a38
mov ebx, dword [esp + 0x90]
test ebx, ebx
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x70], eax
mov dword [esp + 0x80], edx
mov ebp, dword [esi + 4]
mov dword [esp + 0x44], ebp
je 0x512a8f
mov edi, dword [esp + 0x94]
mov edx, dword [esp + 0x40]
cmp edi, edx
jb 0x512c8d
mov eax, dword [esp + 0x98]
sub eax, edx
sub edi, edx
mov esi, eax
neg eax
sar eax, 0x1f
and eax, edx
add eax, ebx
mov dword [esp], eax
mov dword [esp + 4], edi
mov dword [esp + 8], esi
call fcn.0047ecb0
mov eax, dword [esp + 0x10]
jmp 0x512acb
mov edi, dword [esp + 0xa0]
mov ebx, dword [esp + 0x40]
cmp edi, ebx
jb 0x512c84
sub edi, ebx
mov ecx, edi
xchg edi, ebx
neg ebx
xchg edi, ebx
sar edi, 0x1f
and edi, ebx
mov edx, dword [esp + 0x9c]
lea ebp, [edx + edi]
mov dword [esp], ebp
mov dword [esp + 4], ecx
call fcn.0047ee80
mov eax, dword [esp + 0xc]
mov edx, dword [esp + 0x40]
lea ebx, [eax + edx]
mov ebp, dword [esp + 0x7c]
mov ebp, dword [ebp + 4]
cmp ebp, ebx
jge 0x512ae4
mov edx, ebx
jmp 0x512740
inc edx
cmp ebp, edx
jl 0x512740
mov edx, ebp
jmp 0x512740
mov edx, dword [esp + 0x90]
test edx, edx
mov ebx, dword [esp + 0x4c]
mov ebp, dword [esp + 0x78]
mov esi, dword [esp + 0x44]
mov edi, edx
mov edx, dword [esp + 0x50]
jmp 0x512b1a
mov edi, dword [esp + 0x90]
test edi, edi
je 0x512bc2
mov ecx, dword [esp + 0x94]
cmp ecx, esi
jb 0x512c7d
sub ecx, esi
mov dword [esp + 0x74], ecx
lea eax, [ecx + ebx]
mov ecx, dword [esp + 0x98]
sub ecx, esi
neg ecx
sar ecx, 0x1f
and esi, ecx
lea ecx, [edi + esi]
cmp edx, eax
jae 0x512b8f
mov dword [esp + 0x80], ecx
mov dword [esp], ebp
mov dword [esp + 4], eax
mov dword [esp + 8], edx
mov eax, dword [esp + 0x74]
mov dword [esp + 0xc], eax
lea ecx, [0x6e06e0]
mov dword [esp + 0x10], ecx
call fcn.0046cad0
mov ebp, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x80]
mov ebx, dword [esp + 0x4c]
mov dword [esp + 0x4c], eax
mov dword [esp + 0x78], ebp
mov dword [esp + 0x50], edx
add ebx, ebp
mov dword [esp], ebx
mov dword [esp + 4], ecx
mov ecx, dword [esp + 0x74]
mov dword [esp + 8], ecx
call fcn.00472440
mov eax, dword [esp + 0x50]
mov ecx, dword [esp + 0x4c]
mov edx, dword [esp + 0x78]
jmp 0x512c5a
mov ecx, dword [esp + 0xa0]
cmp ecx, esi
jb 0x512c76
sub ecx, esi
lea eax, [ecx + ebx]
mov edi, ecx
neg ecx
sar ecx, 0x1f
and esi, ecx
mov ecx, dword [esp + 0x9c]
add ecx, esi
cmp edx, eax
jae 0x512c30
mov dword [esp + 0x74], edi
mov dword [esp + 0x80], ecx
mov dword [esp], ebp
mov dword [esp + 4], eax
mov dword [esp + 8], edx
mov dword [esp + 0xc], edi
lea eax, [0x6e06e0]
mov dword [esp + 0x10], eax
call fcn.0046cad0
mov ebp, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x80]
mov ebx, dword [esp + 0x4c]
mov edi, dword [esp + 0x74]
mov dword [esp + 0x50], edx
mov dword [esp + 0x4c], eax
mov dword [esp + 0x78], ebp
add ebx, ebp
mov dword [esp], ebx
mov dword [esp + 4], ecx
mov dword [esp + 8], edi
call fcn.00472440
mov eax, dword [esp + 0x50]
mov ecx, dword [esp + 0x4c]
mov edx, dword [esp + 0x78]
mov dword [esp + 0xac], edx
mov dword [esp + 0xb0], ecx
mov dword [esp + 0xb4], eax
add esp, 0x88
ret
mov eax, esi
call fcn.00471b90
mov eax, esi
call fcn.00471b90
mov eax, ebx
mov ecx, edi
call fcn.00471b90
mov eax, edx
mov ecx, edi
call fcn.00471b90
mov eax, 1
mov ecx, eax
call fcn.00471b30
mov eax, edi
mov ecx, esi
call fcn.00471b90
mov ecx, esi
call fcn.00471b50
mov eax, edi
mov ecx, esi
call fcn.00471b90
mov ecx, esi
call fcn.00471b70
nop
call fcn.004706b0
jmp fcn.005126c0