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

Disassembly:
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
lea eax, [esp - 0xb4]
cmp eax, dword [ecx + 8]
jbe 0x51afa5
sub esp, 0x134
mov byte [esp + 0x124], 0
mov dword [esp + 0x128], 0
mov dword [esp + 0x12c], 0
mov dword [esp + 0x130], 0
nop
mov eax, dword [esp + 0x144]
lea ecx, [esp + 0x124]
cmp eax, ecx
je 0x51a3e6
mov ecx, dword [eax + 8]
mov edx, dword [eax + 4]
test ecx, ecx
jg 0x51af03
mov ebx, ecx
xor ebp, ebp
xor esi, esi
cmp ebx, ecx
jge 0x51aefc
mov dword [esp + 0x44], esi
mov dword [esp + 0x34], ecx
mov dword [esp + 0x8c], ebp
cmp edx, ebp
je 0x51a3b1
mov dword [esp], ebp
mov dword [esp + 4], edx
shl ebx, 2
mov dword [esp + 8], ebx
call fcn.004614f0
mov eax, dword [esp + 0x34]
mov dword [esp + 0x12c], eax
mov eax, dword [esp + 0x44]
mov dword [esp + 0x130], eax
mov eax, dword [esp + 0x8c]
mov dword [esp + 0x128], eax
mov eax, dword [esp + 0x144]
movzx ecx, byte [eax]
mov byte [esp + 0x124], cl
mov byte [esp + 0x124], 0
mov byte [esp + 0x114], 0
mov dword [esp + 0x118], 0
mov dword [esp + 0x11c], 0
mov dword [esp + 0x120], 0
nop
mov ecx, dword [esp + 0x148]
lea edx, [esp + 0x114]
cmp ecx, edx
je 0x51aef5
mov edx, dword [ecx + 8]
mov ebx, dword [ecx + 4]
test edx, edx
jg 0x51ae56
mov ebp, edx
xor esi, esi
xor edi, edi
cmp edx, ebp
jle 0x51ae4f
mov dword [esp + 0x30], edx
mov dword [esp + 0x88], esi
mov dword [esp + 0x40], edi
cmp esi, ebx
je 0x51a470
mov dword [esp], esi
mov dword [esp + 4], ebx
shl ebp, 2
mov dword [esp + 8], ebp
call fcn.004614f0
mov eax, dword [esp + 0x30]
mov dword [esp + 0x11c], eax
mov eax, dword [esp + 0x40]
mov dword [esp + 0x120], eax
mov eax, dword [esp + 0x88]
mov dword [esp + 0x118], eax
mov eax, dword [esp + 0x148]
movzx ecx, byte [eax]
mov byte [esp + 0x114], cl
mov byte [esp + 0x114], 0
mov ecx, dword [esp + 0x13c]
test ecx, ecx
je 0x51ae3e
mov edx, 1
mov byte [esp + 0x2d], dl
test dl, dl
jne 0x51adbd
xor ebx, ebx
xor ebp, ebp
mov dword [esp + 0xa0], ebp
mov dword [esp + 0xb0], ebx
mov byte [esp + 0xe4], 0
mov dword [esp + 0xe8], 0
mov dword [esp + 0xec], 0
mov dword [esp + 0xf0], 0
mov byte [esp + 0xd4], 0
mov dword [esp + 0xd8], 0
mov dword [esp + 0xdc], 0
mov dword [esp + 0xe0], 0
mov byte [esp + 0xc4], 0
mov dword [esp + 0xc8], 0
mov dword [esp + 0xcc], 0
mov dword [esp + 0xd0], 0
mov byte [esp + 0xb4], 0
mov dword [esp + 0xb8], 0
mov dword [esp + 0xbc], 0
mov dword [esp + 0xc0], 0
mov eax, dword [esp + 0x128]
mov ecx, dword [esp + 0x12c]
mov edx, dword [esp + 0x130]
mov esi, dword [esp + 0x118]
mov edi, dword [esp + 0x11c]
mov ebx, dword [esp + 0x120]
mov dword [esp], eax
mov dword [esp + 4], ecx
mov dword [esp + 8], edx
mov dword [esp + 0xc], esi
mov dword [esp + 0x10], edi
mov dword [esp + 0x14], ebx
call fcn.0051f8b0
mov eax, dword [esp + 0x18]
test eax, eax
jge 0x51ad9c
lea eax, [esp + 0x124]
mov ecx, dword [esp + 0xa0]
mov edx, dword [esp + 0xb0]
lea ebx, [esp + 0x114]
mov dword [esp + 0xa4], edx
mov dword [esp + 0xac], ebx
mov dword [esp + 0xa0], ecx
mov dword [esp + 0x90], eax
jmp 0x51a62b
mov eax, dword [esp + 0x90]
mov ecx, dword [esp + 0xa0]
mov edx, dword [esp + 0xa4]
mov ebx, dword [esp + 0xac]
mov ebp, dword [eax + 8]
cmp ebp, 1
jle 0x51a7cb
mov dword [esp], ebx
mov dword [esp + 4], eax
call fcn.00519a30
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 8]
mov edx, dword [esp + 0xc]
mov ebx, dword [esp + 0x14]
movzx ebp, byte [esp + 0x18]
test eax, eax
je 0x51a75a
mov dword [esp + 0x64], ecx
mov dword [esp + 0x60], edx
mov dword [esp + 0x58], eax
mov dword [esp + 0x54], ebx
xchg ebp, eax
mov byte [esp + 0x2e], al
xchg ebp, eax
mov esi, dword [esp + 0xac]
mov dword [esp], esi
mov edi, dword [esp + 0x90]
mov dword [esp + 4], edi
lea esi, [esp + 0xe4]
mov dword [esp + 8], esi
lea esi, [esp + 0xd4]
mov dword [esp + 0xc], esi
lea esi, [esp + 0xc4]
mov dword [esp + 0x10], esi
lea esi, [esp + 0xb4]
mov dword [esp + 0x14], esi
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], ebx
xchg ebp, eax
mov byte [esp + 0x28], al
xchg ebp, eax
call fcn.00519c50
movzx eax, byte [esp + 0x2d]
test al, al
je 0x51a60f
mov eax, dword [esp + 0xa4]
mov dword [esp], eax
mov ecx, dword [esp + 0xa0]
mov dword [esp + 4], ecx
lea edx, [esp + 0xe4]
mov dword [esp + 8], edx
lea ebx, [esp + 0xd4]
mov dword [esp + 0xc], ebx
lea ebp, [esp + 0xc4]
mov dword [esp + 0x10], ebp
lea esi, [esp + 0xb4]
mov dword [esp + 0x14], esi
mov edi, dword [esp + 0x64]
mov dword [esp + 0x18], edi
mov edi, dword [esp + 0x60]
mov dword [esp + 0x1c], edi
mov edi, dword [esp + 0x58]
mov dword [esp + 0x20], edi
mov edi, dword [esp + 0x54]
mov dword [esp + 0x24], edi
movzx edi, byte [esp + 0x2e]
xchg edi, eax
mov byte [esp + 0x28], al
xchg edi, eax
call fcn.00519c50
movzx eax, byte [esp + 0x2d]
jmp 0x51a60f
mov eax, dword [esp + 0xac]
mov dword [esp], eax
mov ecx, dword [esp + 0x90]
mov dword [esp + 4], ecx
mov edx, dword [esp + 0xa4]
mov dword [esp + 8], edx
mov ebx, dword [esp + 0xa0]
mov dword [esp + 0xc], ebx
lea ebp, [esp + 0xe4]
mov dword [esp + 0x10], ebp
lea esi, [esp + 0xd4]
mov dword [esp + 0x14], esi
lea edi, [esp + 0xc4]
mov dword [esp + 0x18], edi
lea edi, [esp + 0xb4]
mov dword [esp + 0x1c], edi
movzx edi, byte [esp + 0x2d]
xchg edi, eax
mov byte [esp + 0x20], al
xchg edi, eax
call fcn.00519f40
movzx eax, byte [esp + 0x2d]
jmp 0x51a60f
test ebp, ebp
jle 0x51ad95
cmp dword [ebx + 8], 1
jg 0x51ad29
mov ebp, dword [eax + 8]
mov esi, dword [eax + 4]
test ebp, ebp
jle 0x51ad22
mov ebp, dword [ebx + 8]
mov edi, edx
mov edx, dword [ebx + 4]
mov esi, dword [esi]
test ebp, ebp
jbe 0x51af9b
mov edx, dword [edx]
movzx ebp, byte [esp + 0x2d]
xchg ebp, eax
test al, al
xchg ebp, eax
je 0x51ad17
mov ebp, 1
xor ebp, ebp
mov dword [esp + 0x5c], ebp
mov ebp, 1
mov dword [esp + 0x50], ebp
xor ebp, ebp
mov dword [esp + 0x4c], ebp
mov ebp, 1
xchg ebp, eax
mov byte [esp + 0x2f], al
xchg ebp, eax
mov ebp, 1
jmp 0x51a8aa
mov eax, edx
xor edx, edx
div esi
mov dword [esp + 0x68], eax
mov eax, dword [esp + 0x6c]
xor edx, edx
div esi
mov eax, edx
mov edx, dword [esp + 0x5c]
mov ebx, dword [esp + 0x68]
imul edx, ebx
add edx, ebp
mov ebp, edx
mov edx, dword [esp + 0x50]
imul ebx, edx
mov edx, dword [esp + 0x4c]
add edx, ebx
mov ebx, edx
movzx edx, byte [esp + 0x2f]
xor edx, 1
mov dword [esp + 0x7c], eax
mov eax, dword [esp + 0x50]
mov dword [esp + 0x4c], eax
mov byte [esp + 0x2f], dl
mov eax, dword [esp + 0x90]
mov edx, esi
mov dword [esp + 0x50], ebx
mov ebx, dword [esp + 0xac]
mov esi, dword [esp + 0x7c]
mov esi, ebp
mov ebp, dword [esp + 0x5c]
mov dword [esp + 0x5c], esi
mov esi, dword [esp + 0x7c]
mov dword [esp + 0x6c], edx
test esi, esi
jne 0x51a83a
mov esi, dword [esp + 0xc0]
mov eax, dword [esp + 0xb8]
test ebp, ebp
jne 0x51acac
xor ebp, ebp
mov dword [esp + 0xbc], ebp
mov dword [esp + 0xc0], esi
mov dword [esp + 0xb8], eax
mov eax, dword [esp + 0xd0]
mov ebp, dword [esp + 0xc8]
mov esi, dword [esp + 0x4c]
test esi, esi
jne 0x51ac54
xor esi, esi
mov dword [esp + 0xcc], esi
mov dword [esp + 0xd0], eax
mov dword [esp + 0xc8], ebp
movzx eax, byte [esp + 0x2f]
mov ecx, eax
xor eax, 1
mov byte [esp + 0xb4], al
mov byte [esp + 0xc4], cl
lea eax, [esp + 0xb4]
mov dword [esp], eax
mov dword [esp + 4], edi
mov dword [esp + 8], eax
call fcn.00517fa0
lea eax, [esp + 0xc4]
mov dword [esp], eax
mov ecx, dword [esp + 0xa0]
mov dword [esp + 4], ecx
mov dword [esp + 8], eax
call fcn.00517fa0
mov eax, dword [esp + 0xa4]
mov dword [esp], eax
lea ecx, [esp + 0xb4]
mov dword [esp + 4], ecx
lea ecx, [esp + 0xc4]
mov dword [esp + 8], ecx
call fcn.00517b20
mov eax, dword [esp + 0x6c]
mov edx, dword [esp + 0xac]
mov ecx, dword [edx + 8]
mov ebx, dword [edx + 4]
test ecx, ecx
jbe 0x51af94
mov dword [ebx], eax
mov ecx, dword [esp + 0x144]
movzx ebx, byte [ecx]
mov byte [esp + 0x2c], bl
mov ebp, dword [esp + 0x140]
test ebp, ebp
je 0x51ac46
mov esi, dword [esp + 0x148]
cmp ebp, esi
jne 0x51ac3f
nop
mov eax, edx
mov edx, dword [esp + 0x90]
cmp esi, edx
je 0x51aa60
mov edi, ebx
mov ebx, dword [edx + 0xc]
mov ecx, dword [edx + 4]
mov ebp, dword [esi + 8]
mov dword [esp + 0x38], ebp
mov esi, dword [esi + 4]
cmp ebx, ebp
jl 0x51aba0
mov dword [esp + 0x3c], ebx
mov ebx, dword [esp + 0x38]
cmp ebp, ebx
jle 0x51ab99
mov dword [esp + 0x78], ebp
mov dword [esp + 0x84], ecx
cmp ecx, esi
je 0x51aa27
mov dword [esp], ecx
mov dword [esp + 4], esi
shl ebx, 2
mov dword [esp + 8], ebx
call fcn.004614f0
mov ecx, dword [esp + 0x78]
mov edx, dword [esp + 0x90]
mov dword [edx + 8], ecx
mov ecx, dword [esp + 0x3c]
mov dword [edx + 0xc], ecx
mov ecx, dword [0x10fd360]
test ecx, ecx
jne 0x51ab85
mov eax, dword [esp + 0x84]
mov dword [edx + 4], eax
mov eax, dword [esp + 0x148]
movzx eax, byte [eax]
mov byte [edx], al
mov dword [esp + 0xa8], edx
mov eax, dword [esp + 0x140]
mov dword [esp], eax
mov ecx, dword [esp + 0x144]
mov dword [esp + 4], ecx
mov ecx, dword [esp + 0xa4]
mov dword [esp + 8], ecx
call fcn.00517fa0
movzx eax, byte [esp + 0x2c]
test al, al
je 0x51ab79
mov ecx, dword [esp + 0x140]
movzx edx, byte [ecx]
xor edx, 1
mov byte [ecx], dl
mov dword [esp], ecx
mov eax, dword [esp + 0xac]
mov dword [esp + 4], eax
mov dword [esp + 8], ecx
call fcn.00517d60
mov eax, dword [esp + 0x140]
mov dword [esp], eax
mov dword [esp + 4], eax
mov eax, dword [esp + 0xa8]
mov dword [esp + 8], eax
call fcn.00518760
mov eax, dword [esp + 0x13c]
test eax, eax
je 0x51ab21
mov ecx, dword [esp + 0xa4]
mov edx, dword [ecx + 4]
movzx ebx, byte [ecx]
mov ebp, dword [ecx + 8]
mov ecx, dword [ecx + 0xc]
mov byte [eax], bl
mov dword [eax + 8], ebp
mov dword [eax + 0xc], ecx
mov ecx, dword [0x10fd360]
test ecx, ecx
jne 0x51ab69
mov dword [eax + 4], edx
movzx ecx, byte [esp + 0x2c]
test cl, cl
je 0x51ab21
movzx ecx, byte [eax]
xor ecx, 1
mov byte [eax], cl
mov ecx, dword [esp + 0xac]
mov eax, dword [ecx + 4]
movzx edx, byte [ecx]
mov ebx, dword [ecx + 0xc]
mov ecx, dword [ecx + 8]
mov ebp, dword [esp + 0x138]
mov byte [ebp], dl
mov dword [ebp + 8], ecx
mov dword [ebp + 0xc], ebx
mov ecx, dword [0x10fd360]
test ecx, ecx
jne 0x51ab5f
mov dword [ebp + 4], eax
mov dword [esp + 0x14c], ebp
add esp, 0x134
ret
lea edi, [ebp + 4]
call fcn.00460b40
jmp 0x51ab51
lea edi, [eax + 4]
mov ecx, eax
mov eax, edx
call fcn.00460b40
mov eax, ecx
jmp 0x51ab10
mov ecx, dword [esp + 0x140]
jmp 0x51aaa8
lea edi, [edx + 4]
mov eax, dword [esp + 0x84]
call fcn.00460b40
jmp 0x51aa54
mov ebx, ebp
jmp 0x51aa05
mov dword [esp + 0x94], esi
cmp ebp, 1
jne 0x51abf7
lea eax, [0xaa8ee0]
mov dword [esp], eax
mov dword [esp + 4], 1
mov dword [esp + 8], 1
call fcn.00446f30
mov ecx, dword [esp + 0xc]
mov eax, dword [esp + 0xac]
mov edx, dword [esp + 0x90]
mov esi, dword [esp + 0x94]
movzx edi, byte [esp + 0x2c]
mov ebp, 1
mov ebx, 1
jmp 0x51a9f5
lea eax, [0xaa8ee0]
mov dword [esp], eax
mov dword [esp + 4], ebp
lea eax, [ebp + 4]
mov dword [esp + 0x3c], eax
mov dword [esp + 8], eax
call fcn.00446f30
mov ecx, dword [esp + 0xc]
mov eax, dword [esp + 0xac]
mov edx, dword [esp + 0x90]
mov esi, dword [esp + 0x94]
movzx edi, byte [esp + 0x2c]
mov ebp, dword [esp + 0x38]
mov ebx, dword [esp + 0x3c]
jmp 0x51a9f5
mov edx, esi
jmp 0x51aa60
mov eax, dword [esp + 0x13c]
test eax, eax
jmp 0x51aae6
cmp eax, 1
jl 0x51ac66
mov dword [ebp], esi
mov esi, 1
jmp 0x51a8fb
lea eax, [0xaa8ee0]
mov dword [esp], eax
mov dword [esp + 4], 1
mov dword [esp + 8], 1
call fcn.00446f30
mov ebp, dword [esp + 0xc]
mov ecx, dword [esp + 0xa0]
mov edx, dword [esp + 0x6c]
mov ebx, dword [esp + 0xac]
mov esi, dword [esp + 0x4c]
mov edi, dword [esp + 0xa4]
mov eax, 1
jmp 0x51ac59
cmp esi, 1
jl 0x51acbd
mov dword [eax], ebp
mov ebp, 1
jmp 0x51a8ca
mov dword [esp + 0x48], ebp
lea eax, [0xaa8ee0]
mov dword [esp], eax
mov dword [esp + 4], 1
mov dword [esp + 8], 1
call fcn.00446f30
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0xa0]
mov edx, dword [esp + 0x6c]
mov ebx, dword [esp + 0xac]
mov ebp, dword [esp + 0x48]
mov edi, dword [esp + 0xa4]
mov esi, 1
jmp 0x51acb1
mov ecx, eax
mov eax, edx
xor edx, edx
div esi
mov eax, ecx
mov ebp, esi
mov esi, edx
mov edx, ebp
test esi, esi
jne 0x51ad07
mov eax, edx
jmp 0x51a986
mov edx, ebx
jmp 0x51a99d
mov dword [esp], ebx
mov dword [esp + 4], eax
mov dword [esp + 8], edx
mov dword [esp + 0xc], ecx
lea ebp, [esp + 0xe4]
mov dword [esp + 0x10], ebp
lea ebp, [esp + 0xd4]
mov dword [esp + 0x14], ebp
lea ebp, [esp + 0xc4]
mov dword [esp + 0x18], ebp
lea esi, [esp + 0xb4]
mov dword [esp + 0x1c], esi
movzx edi, byte [esp + 0x2d]
xchg edi, eax
mov byte [esp + 0x20], al
xchg edi, eax
call fcn.00519f40
mov eax, dword [esp + 0x90]
mov ecx, dword [esp + 0xa0]
mov edx, dword [esp + 0xa4]
mov ebx, dword [esp + 0xac]
jmp 0x51a7dd
mov edx, ebx
jmp 0x51a99d
lea eax, [esp + 0x114]
mov ecx, dword [esp + 0xb0]
mov edx, dword [esp + 0xa0]
lea ebx, [esp + 0x124]
jmp 0x51a5f1
mov byte [esp + 0x104], 0
mov dword [esp + 0x108], 0
mov dword [esp + 0x10c], 0
mov dword [esp + 0x110], 0
lea eax, [esp + 0x104]
mov dword [esp], eax
mov dword [esp + 4], 1
mov dword [esp + 8], 0
call fcn.005174c0
mov ebp, dword [esp + 0xc]
mov byte [esp + 0xf4], 0
mov dword [esp + 0xf8], 0
mov dword [esp + 0xfc], 0
mov dword [esp + 0x100], 0
lea ebx, [esp + 0xf4]
jmp 0x51a4d1
mov ebx, dword [esp + 0x140]
test ebx, ebx
setne dl
jmp 0x51a4c1
mov ebp, edx
jmp 0x51a44a
mov dword [esp + 0x74], edx
mov dword [esp + 0x98], ebx
cmp edx, 1
jne 0x51aeb0
lea eax, [0xaa8ee0]
mov dword [esp], eax
mov dword [esp + 4], 1
mov dword [esp + 8], 1
call fcn.00446f30
mov esi, dword [esp + 0xc]
mov eax, dword [esp + 0x144]
mov ecx, dword [esp + 0x148]
mov ebx, dword [esp + 0x98]
mov ebp, dword [esp + 0x74]
mov edx, 1
mov edi, 1
jmp 0x51a442
lea eax, [0xaa8ee0]
mov dword [esp], eax
mov dword [esp + 4], edx
lea ecx, [edx + 4]
mov dword [esp + 0x40], ecx
mov dword [esp + 8], ecx
call fcn.00446f30
mov esi, dword [esp + 0xc]
mov eax, dword [esp + 0x144]
mov ecx, dword [esp + 0x148]
mov ebx, dword [esp + 0x98]
mov ebp, dword [esp + 0x74]
mov edx, ebp
mov edi, dword [esp + 0x40]
jmp 0x51a442
mov eax, ecx
jmp 0x51a4a5
mov ebx, ecx
jmp 0x51a38b
mov dword [esp + 0x9c], edx
mov dword [esp + 0x70], ecx
cmp ecx, 1
jne 0x51af56
lea eax, [0xaa8ee0]
mov dword [esp], eax
mov dword [esp + 4], 1
mov dword [esp + 8], 1
call fcn.00446f30
mov ebp, dword [esp + 0xc]
mov eax, dword [esp + 0x144]
mov edx, dword [esp + 0x9c]
mov ebx, dword [esp + 0x70]
mov ecx, 1
mov esi, 1
jmp 0x51a383
lea eax, [0xaa8ee0]
mov dword [esp], eax
mov dword [esp + 4], ecx
lea edx, [ecx + 4]
mov dword [esp + 0x44], edx
mov dword [esp + 8], edx
call fcn.00446f30
mov ebp, dword [esp + 0xc]
mov eax, dword [esp + 0x144]
mov edx, dword [esp + 0x9c]
mov ebx, dword [esp + 0x70]
mov ecx, ebx
mov esi, dword [esp + 0x44]
jmp 0x51a383
xor eax, eax
call fcn.00460bc0
xor eax, eax
mov ecx, ebp
call fcn.00460bc0
nop
call fcn.0045f5f0
jmp fcn.0051a310