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

Disassembly:
sub esp, 0x4c
mov eax, dword [esp + 0x54]
push ebx
push ebp
mov ebp, ecx
mov ecx, dword [esp + 0x68]
push esi
cmp eax, ecx
push edi
mov dword [esp + 0x10], ebp
jne 0x5127f5
mov ecx, dword [esp + 0x68]
mov eax, dword [esp + 0x74]
cmp ecx, eax
jne 0x5127f5
mov edx, dword [esp + 0x6c]
mov eax, dword [esp + 0x78]
cmp edx, eax
je 0x512bcd
lea eax, [esp + 0x40]
mov ecx, ebp
push eax
call fcn.00514700
mov esi, dword [eax]
lea edx, [esp + 0x40]
xor ebx, ebx
push edx
mov edi, dword [eax + 4]
mov ecx, dword [eax + 8]
mov dword [esp + 0x44], ebx
mov dword [esp + 0x38], ecx
lea ecx, [esp + 0x68]
mov dword [esp + 0x48], ebx
mov dword [esp + 0x4c], ebx
call fcn.004fe340
test eax, eax
jne 0x512843
lea eax, [esp + 0x40]
lea ecx, [esp + 0x64]
push eax
call fcn.005002c0
test eax, eax
je 0x512bc0
mov eax, dword [esp + 0x64]
cmp eax, esi
jg 0x512bc0
jne 0x51286f
mov eax, dword [esp + 0x68]
cmp eax, edi
jg 0x512bc0
jne 0x51286f
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x6c]
cmp eax, ecx
jg 0x512bc0
lea edx, [esp + 0x40]
lea ecx, [esp + 0x70]
push edx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x48], ebx
mov dword [esp + 0x4c], ebx
call fcn.004fe340
test eax, eax
jne 0x5128a3
lea eax, [esp + 0x40]
lea ecx, [esp + 0x70]
push eax
call fcn.005002c0
test eax, eax
je 0x512ba9
mov ecx, dword [esp + 0x70]
cmp ecx, esi
jg 0x512ba9
mov ebx, dword [esp + 0x78]
mov edx, dword [esp + 0x74]
jne 0x5128cd
cmp edx, edi
jg 0x512ba7
jne 0x5128cd
cmp ebx, dword [esp + 0x34]
jg 0x512ba7
mov eax, dword [esp + 0x64]
mov edi, dword [esp + 0x6c]
mov esi, dword [esp + 0x68]
cmp eax, ecx
jg 0x5128eb
cmp eax, ecx
jne 0x51291d
cmp esi, edx
jg 0x5128eb
jne 0x51291d
cmp edi, ebx
jle 0x51291d
mov ebp, eax
mov dword [esp + 0x44], esi
mov dword [esp + 0x48], edi
mov eax, ecx
mov esi, edx
mov edx, dword [esp + 0x44]
mov edi, ebx
mov ebx, dword [esp + 0x48]
mov ecx, ebp
mov dword [esp + 0x64], eax
mov dword [esp + 0x68], esi
mov dword [esp + 0x6c], edi
mov dword [esp + 0x70], ecx
mov dword [esp + 0x74], edx
mov dword [esp + 0x78], ebx
mov dword [esp + 0x2c], edi
mov edi, dword [esp + 0x10]
mov ebp, eax
mov dword [esp + 0x1c], ecx
push eax
mov ecx, edi
mov dword [esp + 0x24], ebp
mov dword [esp + 0x2c], esi
mov dword [esp + 0x40], edx
mov dword [esp + 0x44], ebx
call fcn.0050de30
mov esi, eax
test esi, esi
je 0x512bcd
mov ebx, dword [esp + 0x1c]
mov ecx, edi
push ebx
call fcn.0050de30
test eax, eax
mov dword [esp + 0x14], eax
je 0x512bcd
mov ecx, ebx
mov eax, 1
sub ecx, ebp
mov dword [esp + 0x18], eax
dec ecx
cmp ecx, eax
mov dword [esp + 0x24], ecx
jl 0x5129f8
jmp 0x512985
mov ebp, dword [esp + 0x20]
mov edi, dword [esp + 0x10]
add eax, ebp
mov ecx, edi
push eax
call fcn.0050de30
test eax, eax
je 0x5129f8
lea ecx, [eax + 0x14]
mov ebx, dword [eax + 0x14]
mov edx, dword [ecx + 4]
test edx, edx
mov ebp, dword [ecx + 8]
mov dword [esp + 0x54], ebp
mov ecx, dword [ecx + 0xc]
jge 0x5129ac
xor edx, edx
mov ebp, dword [edi + 0x20]
sub ebp, dword [edi + 0x18]
cmp ecx, ebp
jle 0x5129be
mov ecx, dword [edi + 0x20]
mov ebp, dword [edi + 0x18]
sub ecx, ebp
mov ebp, dword [esp + 0x7c]
mov edi, dword [eax]
push ebp
sub esp, 0x10
mov ebp, esp
mov dword [ebp], ebx
mov dword [ebp + 4], edx
mov edx, dword [esp + 0x68]
mov dword [ebp + 8], edx
mov dword [ebp + 0xc], ecx
mov ecx, dword [esp + 0x74]
push ecx
mov ecx, eax
call dword [edi + 0xf0]
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x24]
inc eax
cmp eax, ecx
mov dword [esp + 0x18], eax
jle 0x51297d
mov edx, dword [esp + 0x28]
mov ebx, dword [esi + 0x14]
push edx
mov ecx, esi
call fcn.004e4940
test eax, eax
je 0x512bcd
mov ecx, dword [esp + 0x2c]
mov ebp, dword [eax + 0x14]
mov edx, dword [eax]
push ecx
mov ecx, dword [esp + 0x64]
add ebx, ebp
push ecx
lea ecx, [esp + 0x34]
push ecx
mov ecx, eax
call dword [edx + 0x304]
mov edx, eax
mov ebp, dword [esi + 0x18]
mov eax, dword [edx]
add ebx, eax
mov eax, dword [esi + 0x20]
mov ecx, dword [edx + 4]
mov edx, dword [esi + 0x1c]
mov dword [esp + 0x30], ecx
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x54], edx
mov edx, dword [esp + 0x3c]
mov edi, dword [ecx + 0x14]
push edx
mov dword [esp + 0x5c], eax
call fcn.004e4940
test eax, eax
je 0x512bcd
mov ecx, dword [eax + 0x14]
mov edx, dword [eax]
add edi, ecx
mov ecx, dword [esp + 0x40]
push ecx
mov ecx, dword [esp + 0x64]
push ecx
lea ecx, [esp + 0x48]
push ecx
mov ecx, eax
call dword [edx + 0x304]
mov edx, eax
mov eax, dword [edx]
add edi, eax
mov eax, dword [esp + 0x14]
mov ecx, dword [edx + 4]
mov edx, dword [eax + 0x18]
mov dword [esp + 0x30], ecx
mov ecx, dword [eax + 0x14]
mov eax, dword [eax + 0x20]
mov dword [esp + 0x30], edx
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x2c], ecx
mov ecx, dword [esp + 0x20]
cmp ecx, edx
mov dword [esp + 0x38], eax
jne 0x512afe
test ebp, ebp
jge 0x512aba
xor ebp, ebp
mov ecx, dword [esp + 0x10]
mov edx, dword [ecx + 0x20]
sub edx, dword [ecx + 0x18]
cmp eax, edx
jle 0x512ad0
mov eax, dword [ecx + 0x20]
mov edx, dword [ecx + 0x18]
sub eax, edx
mov ecx, dword [esp + 0x7c]
mov edx, dword [esi]
push ecx
sub esp, 0x10
mov ecx, esp
mov dword [ecx], ebx
mov dword [ecx + 4], ebp
mov dword [ecx + 8], edi
mov dword [ecx + 0xc], eax
mov eax, dword [esp + 0x74]
push eax
mov ecx, esi
call dword [edx + 0xf0]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4c
ret 0x20
mov eax, dword [esp + 0x58]
test ebp, ebp
jge 0x512b08
xor ebp, ebp
mov ecx, dword [esp + 0x10]
mov edx, dword [ecx + 0x20]
sub edx, dword [ecx + 0x18]
cmp eax, edx
jle 0x512b1e
mov eax, dword [ecx + 0x20]
mov edx, dword [ecx + 0x18]
sub eax, edx
mov ecx, dword [esp + 0x7c]
mov edx, dword [esi]
push ecx
mov dword [esp + 0x44], edx
sub esp, 0x10
mov ecx, dword [esp + 0x68]
mov edx, esp
mov dword [edx], ebx
mov ebx, dword [esp + 0x74]
push ebx
mov dword [edx + 4], ebp
mov dword [edx + 8], ecx
mov ecx, esi
mov dword [edx + 0xc], eax
mov edx, dword [esp + 0x58]
call dword [edx + 0xf0]
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x38]
test ecx, ecx
jge 0x512b60
xor ecx, ecx
mov esi, dword [esp + 0x10]
mov ebp, dword [esi + 0x20]
sub ebp, dword [esi + 0x18]
cmp eax, ebp
jle 0x512b76
mov eax, dword [esi + 0x20]
mov ebp, dword [esi + 0x18]
sub eax, ebp
mov ebp, dword [esp + 0x7c]
mov esi, dword [esp + 0x14]
push ebp
sub esp, 0x10
mov esi, dword [esi]
mov ebp, esp
push ebx
mov dword [ebp], edx
mov dword [ebp + 4], ecx
mov ecx, dword [esp + 0x2c]
mov dword [ebp + 8], edi
mov dword [ebp + 0xc], eax
call dword [esi + 0xf0]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4c
ret 0x20
xor ebx, ebx
mov eax, dword [esp + 0x60]
push ebx
push eax
mov ecx, ebp
call fcn.00512de0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4c
ret 0x20
mov ecx, dword [esp + 0x60]
push ebx
push ecx
mov ecx, ebp
call fcn.00512de0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4c
ret 0x20