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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
push ebx
push esi
mov esi, dword [ebp + 8]
mov eax, dword [esi + 0x14]
mov eax, dword [eax + 0xc]
push edi
test eax, eax
je 0x5116e0
push eax
call dword [0x58e7f0]
add esp, 4
mov edi, dword [esi + 0x18]
cmp byte [edi + 9], 0
je 0x5116f7
inc dword [edi + 0xc]
cmp byte [edi + 0xa], 0
jne 0x5116f7
call fcn.004b2df0
mov eax, dword [esi]
test eax, eax
je 0x51170e
mov eax, dword [eax + 0xc]
test eax, eax
je 0x51170e
push eax
call dword [0x58e7f0]
add esp, 4
mov ebx, dword [esi + 0x1c]
xor ecx, ecx
cmp ebx, ecx
je 0x511725
cmp ebx, 5
je 0x511725
cmp ebx, 6
jne 0x511f3d
mov eax, dword [esi + 0x18]
mov edx, dword [eax + 4]
mov edx, dword [edx]
mov dword [ebp - 0x20], edx
mov edx, dword [esi + 4]
mov edx, dword [edx + 4]
mov edx, dword [edx]
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], edx
mov dword [ebp - 0x24], ecx
cmp dword [esi], ecx
je 0x511758
mov edx, dword [eax + 4]
cmp byte [edx + 0x14], 2
jne 0x511758
mov ebx, 5
jmp 0x51191d
xor ebx, ebx
cmp byte [eax + 8], cl
jne 0x51191d
mov ebx, dword [eax + 4]
mov esi, dword [ebx]
mov dword [ebp - 4], ecx
cmp byte [eax + 9], cl
je 0x511781
inc dword [eax + 0xc]
cmp byte [eax + 0xa], cl
jne 0x511781
mov edi, eax
call fcn.004b2df0
mov eax, edi
mov al, byte [eax + 8]
cmp al, 2
je 0x5118fd
cmp al, 1
je 0x5118fd
mov edx, dword [ebp - 8]
mov eax, dword [edx]
mov eax, dword [eax + 0x20]
and eax, 0x2000000
xor ecx, ecx
xor edi, edi
or eax, ecx
je 0x5117b7
cmp byte [esi + 0xe], cl
jne 0x5117b7
mov eax, 0xfffe
and word [ebx + 0x18], ax
movzx ecx, word [ebx + 0x18]
test cl, cl
jns 0x5117d2
mov eax, dword [ebx + 0x50]
cmp dword [eax], edi
je 0x5117d2
mov dword [ebp - 4], 0x106
jmp 0x5118fd
cmp byte [edx + 9], 0
mov eax, dword [edx + 4]
je 0x511816
cmp dword [eax + 0x50], edx
je 0x5117f2
test byte [eax + 0x18], 0x40
je 0x5117f2
mov dword [ebp - 4], 0x106
jmp 0x5118fd
mov eax, dword [eax + 0x4c]
cmp eax, edi
je 0x511816
mov esi, 1
mov edi, edi
cmp dword [eax], edx
je 0x51180f
cmp dword [eax + 4], esi
jne 0x51180f
cmp byte [eax + 8], 1
jne 0x5117c6
mov eax, dword [eax + 0xc]
cmp eax, edi
jne 0x511800
mov eax, ecx
and eax, 0xffef
mov dword [ebp - 4], edi
mov word [ebx + 0x18], ax
cmp dword [ebx + 0x30], edi
jne 0x511830
or eax, 0x10
mov word [ebx + 0x18], ax
cmp dword [ebx + 0xc], 0
jne 0x511848
push ebx
call fcn.00509510
add esp, 4
mov dword [ebp - 4], eax
test eax, eax
je 0x511830
jmp 0x51184e
cmp dword [ebp - 4], 0
je 0x51187e
cmp byte [ebx + 0x14], 0
jne 0x51187e
mov eax, dword [ebx + 0xc]
test eax, eax
je 0x51187e
mov dword [ebx + 0xc], 0
mov eax, dword [eax + 0x48]
mov esi, dword [eax + 0x14]
call fcn.004b0660
mov ecx, dword [esi + 0xd4]
cmp dword [ecx + 0xc], 0
jne 0x51187e
call fcn.004c5090
cmp byte [ebp - 4], 5
jne 0x5118c7
cmp byte [ebx + 0x14], 0
jne 0x5118c7
mov edi, dword [ebx + 4]
mov eax, dword [edi + 0x1a4]
test eax, eax
je 0x5118c7
mov ecx, dword [edi + 0x1ac]
test ecx, ecx
js 0x5118c7
mov edx, dword [edi + 0x1a8]
push ecx
push edx
call eax
add esp, 8
test eax, eax
je 0x5118bd
inc dword [edi + 0x1ac]
jmp 0x511830
mov dword [edi + 0x1ac], 0xffffffff
cmp dword [ebp - 4], 0
jne 0x5118fd
mov eax, dword [ebp - 8]
cmp byte [eax + 8], 0
jne 0x5118ef
inc dword [ebx + 0x2c]
cmp byte [eax + 9], 0
je 0x5118ef
mov byte [eax + 0x28], 1
mov ecx, dword [ebx + 0x4c]
lea edx, [eax + 0x20]
mov dword [eax + 0x2c], ecx
mov dword [ebx + 0x4c], edx
mov byte [eax + 8], 1
cmp byte [ebx + 0x14], 1
jae 0x5118fd
mov byte [ebx + 0x14], 1
mov esi, dword [ebp - 8]
cmp byte [esi + 9], 0
je 0x511910
dec dword [esi + 0xc]
jne 0x511910
call fcn.004b2dd0
mov ebx, dword [ebp - 4]
mov esi, dword [ebp + 8]
mov dword [ebp - 0x24], 1
cmp dword [esi + 0xc], 0
jne 0x511947
test ebx, ebx
jne 0x511970
mov eax, dword [esi + 0x18]
mov ecx, dword [eax + 4]
mov edx, dword [esi + 4]
mov eax, dword [ecx + 0x24]
push ebx
push ebx
push edx
call fcn.004fac60
add esp, 0xc
cmp eax, 7
jne 0x51194b
mov ebx, eax
jmp 0x511970
test ebx, ebx
jne 0x511970
cmp dword [esi + 0xc], 0
jne 0x511970
mov ecx, dword [esi + 4]
lea eax, [esi + 8]
push eax
push 2
push ecx
call fcn.005097d0
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x511970
mov dword [esi + 0xc], 1
mov eax, dword [esi + 4]
mov eax, dword [eax + 4]
mov edi, dword [eax + 0x24]
mov edx, dword [esi + 0x18]
mov eax, dword [eax]
mov ecx, dword [edx + 4]
movzx eax, byte [eax + 5]
mov edx, dword [ecx + 0x24]
mov dword [ebp - 0x14], edx
mov dword [ebp - 8], edi
mov dword [ebp - 0x28], eax
test ebx, ebx
jne 0x5119a1
cmp eax, 5
jne 0x5119a1
cmp edx, edi
je 0x5119a1
lea ebx, [eax + 3]
mov ecx, dword [ecx + 0x30]
and ecx, 0x7fffffff
mov dword [ebp - 4], ecx
mov dword [ebp - 0x10], 0
mov eax, dword [ebp + 0xc]
test eax, eax
js 0x5119c0
cmp dword [ebp - 0x10], eax
jge 0x511a2e
mov edi, dword [esi + 0x10]
cmp edi, dword [ebp - 4]
ja 0x511a2e
test ebx, ebx
jne 0x511a70
mov ecx, dword [esi + 0x18]
mov ecx, dword [ecx + 4]
mov eax, dword [0x58e8a8]
xor edx, edx
div dword [ecx + 0x24]
inc eax
cmp edi, eax
je 0x511a21
mov eax, dword [ebp - 0x20]
push 2
lea edx, [ebp - 0x18]
push edx
push edi
push eax
mov eax, dword [eax + 0xcc]
call eax
mov ebx, eax
add esp, 0x10
test ebx, ebx
jne 0x511a21
mov ecx, dword [ebp - 0x18]
mov eax, dword [ecx + 4]
push ebx
push eax
push edi
push esi
call fcn.004c5d60
mov ebx, eax
mov eax, dword [ebp - 0x18]
add esp, 0x10
test eax, eax
je 0x511a21
call fcn.004b2220
mov eax, 1
add dword [esi + 0x10], eax
add dword [ebp - 0x10], eax
jmp 0x5119b4
test ebx, ebx
jne 0x511a70
mov eax, dword [ebp - 4]
mov ecx, dword [esi + 0x10]
mov edx, eax
sub edx, ecx
inc edx
mov dword [esi + 0x24], eax
mov dword [esi + 0x20], edx
cmp ecx, eax
ja 0x511a7f
cmp dword [esi + 0x28], ebx
jne 0x511e48
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x18]
mov edx, dword [eax + 4]
mov eax, dword [edx]
mov edx, dword [eax + 0x58]
mov dword [ecx + 0x2c], edx
mov dword [eax + 0x58], ecx
mov dword [ecx + 0x28], 1
jmp 0x511e48
cmp ebx, 0x65
jne 0x511e48
mov esi, dword [ebp + 8]
mov eax, dword [ebp - 4]
test eax, eax
jne 0x511ad5
mov edi, dword [esi + 4]
cmp byte [edi + 9], al
je 0x511a98
inc dword [edi + 0xc]
cmp byte [edi + 0xa], al
jne 0x511a98
call fcn.004b2df0
mov eax, dword [edi + 4]
mov dword [eax + 0x30], 0
mov ecx, dword [edi + 4]
push ecx
call fcn.004e9150
add esp, 4
cmp byte [edi + 9], 0
mov ebx, eax
je 0x511ac5
dec dword [edi + 0xc]
jne 0x511ac5
mov esi, edi
call fcn.004b2dd0
mov esi, dword [ebp + 8]
mov dword [ebp - 4], 1
test ebx, ebx
je 0x511ad5
cmp ebx, 0x65
jne 0x511aea
mov edx, dword [esi + 8]
mov eax, dword [esi + 4]
inc edx
push edx
push 1
push eax
call fcn.004c5c90
add esp, 0xc
mov ebx, eax
test ebx, ebx
jne 0x511e48
mov esi, dword [ebp + 8]
mov eax, dword [esi]
test eax, eax
je 0x511b00
call fcn.004dbf20
cmp dword [ebp - 0x28], 5
jne 0x511b1d
mov eax, dword [esi + 4]
push 2
call fcn.00509bb0
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x511e48
mov ecx, dword [ebp - 0x14]
cmp ecx, dword [ebp - 8]
jge 0x511b54
mov eax, dword [ebp - 8]
cdq
idiv ecx
mov edx, dword [ebp - 4]
mov esi, eax
lea eax, [esi + edx - 1]
cdq
idiv esi
mov edi, eax
mov eax, dword [ebp + 8]
mov edx, dword [eax + 4]
mov esi, dword [edx + 4]
mov eax, dword [0x58e8a8]
xor edx, edx
div dword [esi + 0x24]
inc eax
cmp edi, eax
jne 0x511b60
dec edi
jmp 0x511b60
mov eax, ecx
cdq
idiv dword [ebp - 8]
mov edi, eax
imul edi, dword [ebp - 4]
cmp ecx, dword [ebp - 8]
jge 0x511da9
mov eax, ecx
cdq
mov ecx, eax
mov eax, dword [ebp - 4]
mov esi, edx
push esi
cdq
push ecx
push edx
push eax
mov dword [ebp - 0x3c], ecx
mov dword [ebp - 0x38], esi
call fcn.00484e00
mov ecx, dword [ebp - 0xc]
mov dword [ebp - 0x34], eax
mov eax, dword [ecx + 0x3c]
mov dword [ebp - 0x30], edx
mov edx, dword [ecx + 0x18]
mov dword [ebp - 4], eax
mov dword [ebp - 0x28], edx
cmp edi, dword [ebp - 0x28]
ja 0x511bee
mov eax, dword [ebp + 8]
mov edx, dword [eax + 4]
mov esi, dword [edx + 4]
mov eax, dword [0x58e8a8]
xor edx, edx
div dword [esi + 0x24]
inc eax
cmp edi, eax
je 0x511be7
push 0
lea eax, [ebp - 0x18]
push eax
push edi
push ecx
mov ecx, dword [ecx + 0xcc]
call ecx
mov ebx, eax
add esp, 0x10
test ebx, ebx
jne 0x511be4
mov esi, dword [ebp - 0x18]
call fcn.004c5560
mov ebx, eax
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x511be4
call fcn.004b2220
mov ecx, dword [ebp - 0xc]
inc edi
test ebx, ebx
je 0x511b98
jmp 0x511c01
test ebx, ebx
jne 0x511c01
push 1
push ebx
mov eax, ecx
call fcn.004f2cf0
add esp, 8
mov ebx, eax
mov edx, dword [ebp - 8]
mov ecx, dword [0x58e8a8]
mov esi, dword [ebp - 0x30]
lea eax, [ecx + edx]
cdq
cmp edx, esi
jg 0x511c21
jl 0x511c1c
cmp eax, dword [ebp - 0x34]
jae 0x511c21
mov dword [ebp - 0x28], edx
jmp 0x511c27
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x28], esi
mov edx, dword [ebp - 0x14]
mov dword [ebp - 0x2c], eax
lea eax, [ecx + edx]
cdq
mov edi, eax
mov esi, edx
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x18], esi
test ebx, ebx
jne 0x511e48
cmp esi, dword [ebp - 0x28]
jg 0x511d1a
jl 0x511c57
cmp edi, dword [ebp - 0x2c]
jae 0x511d1a
mov ecx, dword [ebp - 0x38]
mov edx, dword [ebp - 0x3c]
push 0
lea eax, [ebp - 0x10]
push eax
push ecx
push edx
push esi
push edi
mov dword [ebp - 0x10], 0
call fcn.004818d0
inc eax
push eax
mov eax, dword [ebp - 0x20]
push eax
mov eax, dword [eax + 0xcc]
call eax
mov ebx, eax
add esp, 0x10
test ebx, ebx
jne 0x511ca7
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx + 4]
mov ecx, dword [ebp - 4]
mov ebx, dword [ebp - 0x14]
mov edx, dword [ecx]
push esi
push edi
push ebx
push eax
mov eax, dword [edx + 0xc]
push ecx
call eax
add esp, 0x14
mov ebx, eax
mov eax, dword [ebp - 0x10]
mov ecx, eax
test eax, eax
je 0x511d01
test byte [eax + 0x1c], 0x20
je 0x511cfc
mov eax, dword [eax + 0x14]
dec dword [eax + 0x78]
mov edx, dword [eax + 0x88]
mov dword [ecx + 0x10], edx
mov edi, dword [eax + 0x3c]
mov dword [eax + 0x88], ecx
mov edx, dword [ecx + 4]
mov eax, dword [eax + 0x98]
mov ecx, dword [ecx + 0x18]
mov esi, dword [edi]
push edx
cdq
push edx
push eax
dec ecx
push 0
push ecx
call fcn.00484e00
push edx
mov edx, dword [esi + 0x48]
push eax
push edi
call edx
mov esi, dword [ebp - 0x18]
mov edi, dword [ebp - 0x1c]
add esp, 0x10
jmp 0x511d01
call fcn.004b0660
add edi, dword [ebp - 0x3c]
adc esi, dword [ebp - 0x38]
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x18], esi
test ebx, ebx
je 0x511c43
jmp 0x511e48
test ebx, ebx
jne 0x511e48
mov esi, dword [ebp - 4]
mov eax, dword [esi]
mov edx, dword [eax + 0x18]
lea ecx, [ebp - 0x3c]
push ecx
push esi
call edx
add esp, 8
test eax, eax
jne 0x511d5a
mov ecx, dword [ebp - 0x30]
cmp dword [ebp - 0x38], ecx
jl 0x511d5a
jg 0x511d4a
mov edx, dword [ebp - 0x3c]
cmp edx, dword [ebp - 0x34]
jbe 0x511d5a
mov eax, dword [esi]
mov edx, dword [eax + 0x10]
push ecx
mov ecx, dword [ebp - 0x34]
push ecx
push esi
call edx
add esp, 0xc
mov ebx, eax
test eax, eax
jne 0x511e48
mov esi, dword [ebp - 0xc]
mov eax, dword [esi + 0x3c]
mov ecx, dword [eax]
test ecx, ecx
je 0x511d81
push ebx
push 0x15
push eax
mov eax, dword [ecx + 0x28]
call eax
add esp, 0xc
cmp eax, 0xc
jne 0x511d85
xor eax, eax
jmp 0x511d89
test eax, eax
jne 0x511dbb
cmp byte [esi + 7], 0
jne 0x511dbb
movzx eax, byte [esi + 0xa]
mov ecx, dword [esi + 0x3c]
test eax, eax
je 0x511da5
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 0x14]
push ecx
call eax
jmp 0x511db8
xor eax, eax
jmp 0x511dbb
mov eax, dword [ebp - 0xc]
push 0
push 0
mov dword [eax + 0x18], edi
call fcn.004f2cf0
add esp, 8
mov ebx, eax
test ebx, ebx
jne 0x511e48
mov ecx, dword [ebp + 8]
mov edi, dword [ecx + 4]
cmp byte [edi + 8], al
je 0x511e43
cmp byte [edi + 9], al
je 0x511de2
inc dword [edi + 0xc]
cmp byte [edi + 0xa], al
jne 0x511de2
call fcn.004b2df0
cmp byte [edi + 8], 2
jne 0x511e2c
mov ebx, dword [edi + 4]
mov esi, dword [ebx]
call fcn.004fa060
mov dword [ebp - 0x28], eax
test eax, eax
je 0x511e12
cmp byte [edi + 9], 0
je 0x511e0e
dec dword [edi + 0xc]
jne 0x511e0e
mov esi, edi
call fcn.004b2dd0
mov eax, dword [ebp - 0x28]
mov ebx, eax
jmp 0x511e48
dec dword [edi + 0x14]
mov edx, dword [ebx + 0x40]
push edx
mov byte [ebx + 0x14], 1
call fcn.004b04c0
add esp, 4
mov dword [ebx + 0x40], 0
call fcn.004c5950
cmp byte [edi + 9], 0
je 0x511e43
dec dword [edi + 0xc]
jne 0x511e43
mov esi, edi
call fcn.004b2dd0
mov ebx, 0x65
cmp dword [ebp - 0x24], 0
je 0x511f28
mov eax, dword [ebp + 8]
mov esi, dword [eax + 0x18]
cmp byte [esi + 8], 2
jne 0x511ebd
cmp byte [esi + 9], 0
mov eax, dword [esi + 4]
mov dword [ebp - 0x14], eax
je 0x511e7d
inc dword [esi + 0xc]
cmp byte [esi + 0xa], 0
jne 0x511e7d
mov edi, esi
call fcn.004b2df0
mov eax, dword [ebp - 0x14]
cmp byte [eax + 0x11], 0
je 0x511e91
mov edi, dword [ebp - 0x14]
call fcn.00511310
test eax, eax
jne 0x511ead
mov eax, edi
cmp byte [eax + 0x13], 0
je 0x511e9f
mov ecx, dword [eax]
mov edx, dword [eax + 0x30]
mov dword [ecx + 0x18], edx
mov eax, dword [eax]
push 0
push 0
call fcn.004f2cf0
add esp, 8
cmp byte [esi + 9], 0
je 0x511ebd
dec dword [esi + 0xc]
jne 0x511ebd
call fcn.004b2dd0
mov eax, dword [ebp + 8]
mov edi, dword [eax + 0x18]
cmp byte [edi + 8], 0
je 0x511f28
cmp byte [edi + 9], 0
je 0x511edd
inc dword [edi + 0xc]
cmp byte [edi + 0xa], 0
jne 0x511edd
call fcn.004b2df0
cmp byte [edi + 8], 2
jne 0x511f11
mov eax, dword [edi + 4]
mov esi, dword [eax]
mov dword [ebp - 0x28], eax
call fcn.004fa060
test eax, eax
jne 0x511f16
dec dword [edi + 0x14]
mov esi, dword [ebp - 0x28]
mov ecx, dword [esi + 0x40]
push ecx
mov byte [esi + 0x14], 1
call fcn.004b04c0
add esp, 4
mov dword [esi + 0x40], 0
call fcn.004c5950
cmp byte [edi + 9], 0
je 0x511f28
dec dword [edi + 0xc]
jne 0x511f28
mov esi, edi
call fcn.004b2dd0
cmp ebx, 0xc0a
jne 0x511f35
mov ebx, 7
mov edx, dword [ebp + 8]
mov dword [edx + 0x1c], ebx
mov esi, edx
mov eax, dword [esi]
test eax, eax
je 0x511f54
mov eax, dword [eax + 0xc]
test eax, eax
je 0x511f54
push eax
call dword [0x58e7f8]
add esp, 4
mov eax, dword [esi + 0x18]
cmp byte [eax + 9], 0
je 0x511f6c
dec dword [eax + 0xc]
jne 0x511f6c
mov esi, eax
call fcn.004b2dd0
mov esi, dword [ebp + 8]
mov eax, dword [esi + 0x14]
mov eax, dword [eax + 0xc]
test eax, eax
je 0x511f80
push eax
call dword [0x58e7f8]
add esp, 4
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret