Function at 0x511980
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 0x5119b5
mov ecx, dword [esp + 0x68]
mov eax, dword [esp + 0x74]
cmp ecx, eax
jne 0x5119b5
mov edx, dword [esp + 0x6c]
mov eax, dword [esp + 0x78]
cmp edx, eax
je 0x511d8d
lea eax, [esp + 0x40]
mov ecx, ebp
push eax
call fcn.005138c0
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.004fd4d0
test eax, eax
jne 0x511a03
lea eax, [esp + 0x40]
lea ecx, [esp + 0x64]
push eax
call fcn.004ff450
test eax, eax
je 0x511d80
mov eax, dword [esp + 0x64]
cmp eax, esi
jg 0x511d80
jne 0x511a2f
mov eax, dword [esp + 0x68]
cmp eax, edi
jg 0x511d80
jne 0x511a2f
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x6c]
cmp eax, ecx
jg 0x511d80
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.004fd4d0
test eax, eax
jne 0x511a63
lea eax, [esp + 0x40]
lea ecx, [esp + 0x70]
push eax
call fcn.004ff450
test eax, eax
je 0x511d69
mov ecx, dword [esp + 0x70]
cmp ecx, esi
jg 0x511d69
mov ebx, dword [esp + 0x78]
mov edx, dword [esp + 0x74]
jne 0x511a8d
cmp edx, edi
jg 0x511d67
jne 0x511a8d
cmp ebx, dword [esp + 0x34]
jg 0x511d67
mov eax, dword [esp + 0x64]
mov edi, dword [esp + 0x6c]
mov esi, dword [esp + 0x68]
cmp eax, ecx
jg 0x511aab
cmp eax, ecx
jne 0x511add
cmp esi, edx
jg 0x511aab
jne 0x511add
cmp edi, ebx
jle 0x511add
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.0050cff0
mov esi, eax
test esi, esi
je 0x511d8d
mov ebx, dword [esp + 0x1c]
mov ecx, edi
push ebx
call fcn.0050cff0
test eax, eax
mov dword [esp + 0x14], eax
je 0x511d8d
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 0x511bb8
jmp 0x511b45
mov ebp, dword [esp + 0x20]
mov edi, dword [esp + 0x10]
add eax, ebp
mov ecx, edi
push eax
call fcn.0050cff0
test eax, eax
je 0x511bb8
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 0x511b6c
xor edx, edx
mov ebp, dword [edi + 0x20]
sub ebp, dword [edi + 0x18]
cmp ecx, ebp
jle 0x511b7e
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 0x511b3d
mov edx, dword [esp + 0x28]
mov ebx, dword [esi + 0x14]
push edx
mov ecx, esi
call fcn.004e3c30
test eax, eax
je 0x511d8d
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.004e3c30
test eax, eax
je 0x511d8d
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 0x511cbe
test ebp, ebp
jge 0x511c7a
xor ebp, ebp
mov ecx, dword [esp + 0x10]
mov edx, dword [ecx + 0x20]
sub edx, dword [ecx + 0x18]
cmp eax, edx
jle 0x511c90
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 0x511cc8
xor ebp, ebp
mov ecx, dword [esp + 0x10]
mov edx, dword [ecx + 0x20]
sub edx, dword [ecx + 0x18]
cmp eax, edx
jle 0x511cde
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 0x511d20
xor ecx, ecx
mov esi, dword [esp + 0x10]
mov ebp, dword [esi + 0x20]
sub ebp, dword [esi + 0x18]
cmp eax, ebp
jle 0x511d36
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.00511fa0
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.00511fa0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4c
ret 0x20