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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x2bc
push ebx
push esi
push edi
lea eax, [esp + 0x4c]
mov esi, ecx
push 4
xor ebx, ebx
push eax
mov dword [esp + 0xd4], esi
mov dword [esp + 0x28], ebx
call fcn.004c3240
lea ecx, [esp + 0x40]
push 4
push ecx
call fcn.004c3240
add esp, 0x10
lea edx, [esp + 0x4c]
push edx
lea eax, [ebp + 8]
push eax
lea ecx, [esi + 0x58]
call fcn.005288b0
test eax, eax
mov edi, dword [ebp + 8]
je 0x51f237
mov ecx, dword [esp + 0x4c]
mov edx, dword [ecx]
mov eax, dword [edx + 0xc]
call eax
cmp eax, 2
je 0x51f1f4
mov ecx, dword [ebp + 0x34]
mov edx, dword [ebp + 0x38]
mov dword [ecx], ebx
mov dword [edx], 0xc000000d
jmp 0x521c9e
mov ecx, dword [esp + 0x4c]
mov eax, dword [ecx]
mov edx, dword [eax + 0x10]
call edx
push eax
call fcn.00524610
add esp, 4
test eax, eax
jne 0x51f37d
mov eax, dword [ebp + 0x34]
mov ecx, dword [ebp + 0x38]
mov dword [eax], ebx
mov eax, dword [esp + 0x38]
cmp eax, ebx
mov dword [ecx], 0xc0000022
je 0x521cb2
mov edx, dword [eax]
push eax
mov eax, dword [edx + 8]
call eax
jmp 0x521cae
lea ecx, [esp + 0x15c]
call fcn.0053ce10
lea eax, [esp + 0x15c]
push eax
push ebx
push 0x40
push ebx
push edi
lea ecx, [esp + 0x1b8]
call fcn.0050aa80
mov ecx, eax
call fcn.0050aab0
push eax
mov ecx, esi
call fcn.005135d0
test eax, eax
jne 0x51f2bd
mov eax, dword [esp + 0x184]
cmp eax, ebx
mov ecx, dword [ebp + 0x34]
mov dword [ecx], 1
je 0x51f292
mov edx, dword [eax]
push eax
mov eax, dword [edx + 8]
call eax
mov dword [esp + 0x184], ebx
mov eax, dword [esp + 0x164]
cmp eax, ebx
je 0x51f2ac
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov dword [esp + 0x164], ebx
lea ecx, [esp + 0x15c]
call fcn.00525460
jmp 0x521c9e
lea ecx, [esp + 0x15c]
call fcn.0053d0e0
mov ecx, eax
call fcn.005370f0
test eax, eax
lea ecx, [esp + 0x15c]
je 0x51f2ee
mov eax, dword [ebp + 0x34]
mov dword [eax], 1
call fcn.0050bb50
jmp 0x521c9e
lea eax, [esp + 0x40]
push eax
call fcn.0053d000
push eax
lea ecx, [esp + 0x3c]
call fcn.0050afb0
mov eax, dword [esp + 0x40]
cmp eax, ebx
je 0x51f312
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov ecx, dword [esp + 0x38]
mov eax, dword [ecx]
mov edx, dword [eax + 0x18]
call edx
cmp eax, 2
je 0x51f371
mov ecx, dword [esp + 0x38]
mov eax, dword [ecx]
mov edx, dword [eax + 0x10]
call edx
test eax, eax
je 0x51f366
mov eax, dword [ebp + 0x34]
mov ecx, dword [ebp + 0x38]
mov dword [eax], ebx
mov dword [ecx], 0xc000000d
lea ecx, [esp + 0x15c]
call fcn.0050bb50
lea ecx, [esp + 0x38]
call fcn.004e4310
lea ecx, [esp + 0x4c]
call fcn.004e4310
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x34
mov edx, dword [ebp + 0x34]
mov dword [edx], 1
jmp 0x51f33f
lea ecx, [esp + 0x15c]
call fcn.0050bb50
lea eax, [esp + 0x34]
push 4
push eax
call fcn.004c3240
mov eax, dword [esp + 0x54]
add esp, 8
cmp eax, ebx
je 0x51f3c2
mov ecx, dword [eax]
lea edx, [esp + 0x34]
push edx
push 0x10090814
push eax
mov eax, dword [ecx]
call eax
test eax, eax
je 0x51f3c2
mov ecx, dword [ebp + 0x34]
mov edx, dword [ebp + 0x38]
mov dword [ecx], ebx
lea ecx, [esp + 0x34]
mov dword [edx], 0xc0000229
call fcn.004e4310
jmp 0x51f34b
push 0x200
push ebx
mov dword [esp + 0xe8], 0xff
call fcn.004c3370
mov ecx, dword [ebp + 0x2c]
add esp, 8
cmp ecx, ebx
mov dword [esp + 0xd8], eax
mov dword [esp + 0xdc], ebx
mov word [eax], bx
je 0x51f42b
cmp dword [ecx + 4], ebx
je 0x51f42b
push ecx
lea eax, [esp + 0xf4]
push eax
call fcn.004c5160
mov eax, dword [eax]
add esp, 8
push eax
lea ecx, [esp + 0xdc]
call fcn.004c1990
lea ecx, [esp + 0xf0]
call fcn.004c1ad0
mov eax, dword [esp + 0xd8]
cmp dword [0x1018ed58], ebx
je 0x51f47d
push 0x10083198
sub esp, 0xc
mov ecx, esp
push eax
mov dword [ecx], ebx
mov dword [ecx + 4], ebx
mov dword [ecx + 8], ebx
call fcn.004c1990
push 0x10090de0
lea ecx, [esp + 0x104]
call fcn.004d90d0
mov ecx, eax
call fcn.004d8000
mov ecx, eax
call fcn.004c8720
mov ecx, eax
call fcn.004d8000
lea ecx, [esp + 0xf0]
call fcn.004d7f10
lea ecx, [esp + 0x148]
call fcn.00525340
lea ecx, [esp + 0x148]
push ecx
push edi
mov ecx, esi
call fcn.005107f0
lea ecx, [esp + 0x148]
call fcn.0050aab0
push eax
lea edx, [esp + 0xe8]
push edx
call fcn.004c5160
add esp, 8
lea eax, [esp + 0xd4]
push eax
lea ecx, [esp + 0x44]
push ecx
lea ecx, [esi + 0x154]
mov dword [esp + 0xdc], ebx
mov dword [esp + 0x48], edi
call fcn.0050e6c0
mov eax, dword [esp + 0xd4]
cmp eax, ebx
mov edi, dword [0x100821c0]
je 0x51f4ed
push eax
call edi
mov eax, dword [ebp + 0xc]
cmp eax, ebx
je 0x51f4f7
push eax
call edi
lea edx, [ebp + 8]
add esi, 0xe8
push edx
mov ecx, esi
call fcn.0050d3f0
mov edi, eax
neg edi
sbb edi, edi
lea eax, [esp + 0x18]
push 4
add edi, 1
push eax
mov dword [esp + 0x158], edi
call fcn.004c3240
add esp, 8
cmp edi, ebx
je 0x51fe05
lea ecx, [esp + 0x40]
push ecx
call fcn.0053af80
add esp, 4
push eax
lea ecx, [esp + 0x1c]
call fcn.0050afb0
mov eax, dword [esp + 0x40]
cmp eax, ebx
je 0x51f556
mov edx, dword [eax]
push eax
mov eax, dword [edx + 8]
call eax
lea ecx, [esp + 0x18]
push ecx
lea edx, [ebp + 8]
push edx
mov ecx, esi
call fcn.005289e0
mov eax, dword [esp + 0xd8]
sub esp, 0xc
mov ecx, esp
push eax
mov dword [ecx], ebx
mov dword [ecx + 4], ebx
mov dword [ecx + 8], ebx
call fcn.004c1990
mov ecx, dword [esp + 0x24]
call fcn.0053b010
mov ecx, dword [esp + 0x38]
cmp ecx, ebx
mov dword [esp + 0x94], ebx
mov dword [esp + 0x98], ebx
mov dword [esp + 0xc], ebx
mov dword [esp + 0x10], ebx
mov dword [esp + 0x68], ebx
mov dword [esp + 0x58], 0x1008241c
mov word [esp + 0x54], bx
mov word [esp + 0x56], bx
je 0x51fc4b
mov edx, dword [ecx]
mov edx, dword [edx + 0x30]
lea eax, [esp + 0xd0]
push eax
call edx
mov ecx, dword [esp + 0xd0]
mov eax, dword [ecx]
mov eax, dword [eax + 0x10]
lea edx, [esp + 0xc8]
push edx
call eax
lea ecx, [esp + 0x14]
push 4
push ecx
call fcn.004c3240
mov ecx, dword [esp + 0xd0]
mov edx, dword [ecx]
mov edx, dword [edx + 0xc]
add esp, 8
lea eax, [esp + 0x50]
push eax
lea eax, [esp + 0x18]
push eax
call edx
test eax, eax
jne 0x51f6de
cmp dword [esp + 0x50], ebx
je 0x51f629
lea ecx, [esp + 0x94]
call fcn.0050c6c0
jmp 0x51f69b
mov ecx, dword [esp + 0x14]
mov edx, dword [ecx]
mov edx, dword [edx + 0x1c]
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x144]
push eax
call edx
mov ecx, eax
call fcn.0050aab0
push eax
lea eax, [esp + 0x8c]
push eax
call fcn.004c5160
add esp, 8
push eax
lea ecx, [esp + 0x9c]
call fcn.0050c460
mov eax, dword [esp + 0x84]
cmp eax, ebx
je 0x51f68f
push eax
call fcn.004c3420
add esp, 4
mov dword [esp + 0x84], ebx
mov dword [esp + 0x88], ebx
mov dword [esp + 0x8c], ebx
lea ecx, [esp + 0x140]
call fcn.00525460
mov eax, dword [esp + 0x14]
cmp eax, ebx
je 0x51f6af
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov dword [esp + 0x14], ebx
lea eax, [esp + 0x14]
push 4
push eax
call fcn.004c3240
mov ecx, dword [esp + 0xd0]
mov edx, dword [ecx]
mov edx, dword [edx + 0xc]
add esp, 8
lea eax, [esp + 0x50]
push eax
lea eax, [esp + 0x18]
push eax
call edx
test eax, eax
je 0x51f615
lea ecx, [esp + 0x14]
call fcn.004e4310
mov esi, dword [0x1018efa4]
mov edi, dword [0x10082210]
push 2
push ebx
push ebx
lea eax, [esp + 0x108]
push eax
add esi, 0x430
call edi
mov ecx, dword [ebp + 8]
push eax
push ecx
call edi
mov edx, dword [esi]
push eax
mov eax, dword [edx + 0x24]
mov ecx, esi
call eax
call eax
test eax, eax
jne 0x51fc17
mov dword [esp + 0x3c], 0x100
mov dword [esp + 0x90], 1
mov eax, dword [esp + 0xc]
cmp eax, ebx
je 0x51f74e
push eax
call fcn.004c3420
add esp, 4
mov dword [esp + 0xc], ebx
mov dword [esp + 0x10], ebx
mov edi, dword [esp + 0x3c]
push edi
call fcn.004c32d0
mov esi, dword [0x1018efa4]
mov ecx, dword [esp + 0x94]
add esp, 4
add esi, 0x4f0
cmp ecx, ebx
setne dl
neg ecx
sbb ecx, ecx
and ecx, dword [ebp + 0x2c]
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], edi
push edx
push ecx
mov ecx, dword [ebp + 0x24]
push 1
push ecx
push edi
push eax
lea ecx, [esp + 0x1d4]
call fcn.0053ae20
mov ecx, eax
call fcn.0050aab0
mov edx, dword [esp + 0x114]
push eax
mov eax, dword [esi]
push ebx
push ebx
push ebx
push edx
mov edx, dword [eax + 0x24]
mov ecx, esi
call edx
call eax
cmp eax, 0xc0000004
je 0x51fbe7
cmp eax, 0x80000005
je 0x51fbe7
cmp eax, 0xc0000023
je 0x51fbe7
cmp eax, ebx
jne 0x51fbf6
cmp dword [esp + 0x90], ebx
je 0x51f7ef
mov dword [esp + 0x90], ebx
lea eax, [esp + 0x14]
push 4
push eax
call fcn.004c3240
mov eax, dword [ebp + 0x24]
add eax, 0xfffffffe
add esp, 8
cmp eax, 0x23
ja 0x51fbbc
movzx ecx, byte [eax + 0x10062ce0]
jmp dword [ecx*4 + 0x10062ccc]
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0xc]
push eax
call fcn.0053b110
mov eax, dword [esp + 0x14]
cmp eax, ebx
je 0x51f735
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov dword [esp + 0x14], ebx
jmp 0x51f735
add edi, 0x100
mov dword [esp + 0x3c], edi
jmp 0x51f735
mov ecx, dword [0x1018efa4]
mov eax, dword [esp + 0xfc]
mov edx, dword [ecx + 0x280]
add ecx, 0x280
push eax
mov eax, dword [edx + 0x24]
call eax
call eax
mov eax, dword [esp + 0xc8]
cmp eax, ebx
je 0x51fc31
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov dword [esp + 0xc8], ebx
mov eax, dword [esp + 0xd0]
cmp eax, ebx
je 0x51fc4b
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov dword [esp + 0xd0], ebx
lea ecx, [esp + 0x114]
mov dword [esp + 0x78], ebx
mov dword [esp + 0x7c], ebx
call fcn.00525340
push 0x200
mov esi, 0xff
push ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], esi
call fcn.004c3370
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], ebx
mov word [eax], bx
lea eax, [esp + 0x2c]
push 4
push eax
call fcn.004c3240
push 0x200
push ebx
mov dword [esp + 0xa4], esi
call fcn.004c3370
mov edi, eax
mov word [edi], bx
mov ecx, dword [0x1018efa4]
add esp, 0x18
cmp dword [ecx + 0x98], ebx
mov dword [esp + 0x84], edi
mov dword [esp + 0x88], ebx
jne 0x51fd25
mov ecx, dword [ebp + 0x24]
lea eax, [ecx - 2]
cmp eax, 0x23
ja 0x521a1d
movzx edx, byte [eax + 0x10062d18]
jmp dword [edx*4 + 0x10062d04]
mov ecx, dword [esp + 0x18]
call fcn.0053b190
mov eax, dword [esp + 0x84]
cmp eax, ebx
je 0x51fd42
push eax
call fcn.004c3420
add esp, 4
mov eax, dword [esp + 0x24]
cmp eax, ebx
je 0x51fd56
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov dword [esp + 0x24], ebx
mov eax, dword [esp + 0x28]
cmp eax, ebx
je 0x51fd73
push eax
call fcn.004c3420
add esp, 4
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebx
lea ecx, [esp + 0x114]
call fcn.00525460
lea ecx, [esp + 0x78]
call fcn.0050c720
lea ecx, [esp + 0x78]
call fcn.0050c720
mov eax, dword [esp + 0x78]
cmp eax, ebx
je 0x51fdb2
lea esp, [esp]
mov esi, dword [eax + 4]
push eax
call fcn.004d7ef0
add esp, 4
cmp esi, ebx
mov eax, esi
jne 0x51fda0
mov eax, dword [esp + 0x68]
cmp eax, ebx
je 0x51fdc3
push eax
call fcn.004c3420
add esp, 4
mov eax, dword [esp + 0xc]
cmp eax, ebx
je 0x51fddc
push eax
call fcn.004c3420
add esp, 4
mov dword [esp + 0xc], ebx
mov dword [esp + 0x10], ebx
lea ecx, [esp + 0x94]
call fcn.0050c6c0
mov eax, dword [esp + 0x94]
cmp eax, ebx
je 0x51fe05
mov esi, dword [eax + 4]
push eax
call fcn.004d7ef0
add esp, 4
cmp esi, ebx
mov eax, esi
jne 0x51fdf3
mov ecx, dword [esp + 0xcc]
lea eax, [ebp + 8]
push eax
add ecx, 0xe8
call fcn.0050dc30
mov esi, eax
mov eax, dword [esp + 0x18]
cmp eax, ebx
je 0x51fe31
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov dword [esp + 0x18], ebx
mov ecx, dword [esi]
cmp ecx, ebx
mov dword [esp + 0x18], ecx
je 0x51fe47
mov eax, dword [ecx]
push ecx
mov ecx, dword [eax + 4]
call ecx
mov ecx, dword [esp + 0x18]
mov edx, dword [ebp + 0x34]
mov dword [edx], ebx
call fcn.0053b270
test eax, eax
je 0x521b3e
mov edi, dword [ebp + 0x38]
mov dword [edi], 0xc000000f
jmp 0x521bf1
cmp dword [esp + 0x38], ebx
je 0x521a2e
mov eax, dword [ebp + 0x34]
mov dword [eax], 1
jmp 0x521a6d
mov ecx, dword [ebp + 0x38]
mov eax, dword [ebp + 0x10]
cmp eax, ebx
mov edx, dword [ebp + 0x34]
mov esi, dword [ebp + 0x14]
mov dword [ecx], 0xc000000d
mov dword [edx], ebx
je 0x521a5a
mov ecx, dword [ebp + 0x18]
push ebx
push ecx
push esi
push eax
call dword [0x1008219c]
push eax
call dword [0x1018ef4c]
mov edx, dword [ebp + 8]
mov ecx, dword [esp + 0xcc]
push ebx
push ebx
push esi
push edx
call fcn.005134b0
push edi
call fcn.004c3420
mov eax, dword [esp + 0x28]
add esp, 4
cmp eax, ebx
je 0x521a8a
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov dword [esp + 0x24], ebx
mov eax, dword [esp + 0x28]
cmp eax, ebx
je 0x521aa7
push eax
call fcn.004c3420
add esp, 4
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebx
lea ecx, [esp + 0x114]
call fcn.00525460
lea ecx, [esp + 0x78]
call fcn.0050c720
lea ecx, [esp + 0x78]
call fcn.0050c720
mov eax, dword [esp + 0x78]
cmp eax, ebx
je 0x521ae2
lea ecx, [ecx]
mov esi, dword [eax + 4]
push eax
call fcn.004d7ef0
add esp, 4
cmp esi, ebx
mov eax, esi
jne 0x521ad0
mov eax, dword [esp + 0x68]
cmp eax, ebx
je 0x521af3
push eax
call fcn.004c3420
add esp, 4
mov eax, dword [esp + 0xc]
cmp eax, ebx
je 0x521b0c
push eax
call fcn.004c3420
add esp, 4
mov dword [esp + 0xc], ebx
mov dword [esp + 0x10], ebx
lea ecx, [esp + 0x94]
call fcn.0050c6c0
mov eax, dword [esp + 0x94]
cmp eax, ebx
je 0x521c42
mov esi, dword [eax + 4]
push eax
call fcn.004d7ef0
add esp, 4
cmp esi, ebx
mov eax, esi
jne 0x521b27
jmp 0x521c42
cmp byte [ebp + 0x30], bl
je 0x521b4c
mov ecx, dword [esp + 0x18]
call fcn.0053b190
mov ecx, dword [esp + 0x18]
call fcn.0053b2e0
test eax, eax
je 0x521b75
mov eax, dword [esp + 0x150]
mov edi, dword [ebp + 0x38]
neg eax
sbb eax, eax
and eax, 0x40000009
add eax, 0x80000006
mov dword [edi], eax
jmp 0x521bf1
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x54]
push eax
mov dword [esp + 0x58], ebx
mov dword [esp + 0x5c], ebx
call fcn.0053b350
mov esi, dword [ebp + 0x20]
mov eax, dword [esp + 0x58]
cmp esi, eax
jae 0x521bb6
mov ecx, dword [esp + 0x18]
call fcn.0053b500
mov edi, dword [ebp + 0x38]
cmp esi, eax
sbb ecx, ecx
and ecx, 0x3fffffff
add ecx, 0x80000005
mov dword [edi], ecx
jmp 0x521be0
mov edx, dword [esp + 0x54]
push eax
mov eax, dword [ebp + 0x1c]
push edx
push eax
call fcn.004c3260
mov ecx, dword [ebp + 0x18]
mov edx, dword [esp + 0x64]
mov dword [ecx + 4], edx
mov ecx, dword [esp + 0x24]
add esp, 0xc
call fcn.0053b200
mov edi, dword [ebp + 0x38]
mov dword [edi], ebx
mov eax, dword [esp + 0x54]
cmp eax, ebx
je 0x521bf1
push eax
call fcn.004c3420
add esp, 4
mov eax, dword [esp + 0xd4]
cmp eax, ebx
mov esi, dword [0x100821b8]
je 0x521c05
push eax
call esi
mov eax, dword [ebp + 0xc]
cmp eax, ebx
je 0x521c0f
push eax
call esi
mov eax, dword [ebp + 0x10]
cmp eax, ebx
mov esi, dword [ebp + 0x14]
je 0x521c2d
mov ecx, dword [ebp + 0x18]
push ebx
push ecx
push esi
push eax
call dword [0x1008219c]
push eax
call dword [0x1018ef4c]
mov edx, dword [edi]
mov eax, dword [ebp + 8]
mov ecx, dword [esp + 0xcc]
push ebx
push edx
push esi
push eax
call fcn.005134b0
mov eax, dword [esp + 0x18]
cmp eax, ebx
je 0x521c56
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov dword [esp + 0x18], ebx
mov eax, dword [esp + 0xe4]
cmp eax, ebx
je 0x521c6a
push eax
call fcn.004c3420
add esp, 4
lea ecx, [esp + 0x148]
call fcn.00525460
mov eax, dword [esp + 0xd8]
cmp eax, ebx
je 0x521c8a
push eax
call fcn.004c3420
add esp, 4
mov eax, dword [esp + 0x34]
cmp eax, ebx
je 0x521c9e
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov dword [esp + 0x34], ebx
mov eax, dword [esp + 0x38]
cmp eax, ebx
je 0x521cb2
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov dword [esp + 0x38], ebx
mov eax, dword [esp + 0x4c]
cmp eax, ebx
je 0x521cc2
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x34