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

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, 9
push 0
push 0
dec ecx
jne 0x51f11d
xchg dword [ebp - 4], ecx
push ebx
push esi
push edi
test dl, dl
je 0x51f136
add esp, 0xfffffff0
call fcn.00404e48
mov dword [ebp - 0xc], ecx
mov byte [ebp - 5], dl
mov ebx, eax
mov esi, dword [ebp + 0x14]
xor eax, eax
push ebp
push 0x51f3c0
push dword fs:[eax]
mov dword fs:[eax], esp
mov ecx, dword [ebp - 0xc]
xor edx, edx
mov eax, ebx
call fcn.0051bb18
mov eax, dword [ebx + 0x40]
call fcn.004063f4
mov dword [ebx + 0x44], eax
xor eax, eax
mov dword [ebx + 0x18], eax
xor eax, eax
mov dword [ebx + 0x50], eax
mov dl, 1
mov eax, dword [0x50e49c]
call fcn.00404ab4
mov dword [ebx + 0x54], eax
mov eax, esi
call fcn.0053d5bc
push eax
push 0
mov ecx, ebx
mov dl, 1
mov eax, dword [0x50e434]
call fcn.0050fdb0
mov edi, eax
lea eax, [edi + 0xc]
mov edx, dword [esi + 0x1c]
call fcn.00405a98
cmp dword [ebp + 0x10], 0
je 0x51f20f
mov eax, dword [ebp + 0x10]
mov eax, dword [eax + 4]
test eax, eax
je 0x51f1b9
sub eax, 4
mov eax, dword [eax]
test eax, eax
jle 0x51f20f
mov eax, edi
call fcn.00510154
mov edx, dword [edi + 0x20]
mov eax, esi
call fcn.0053e228
mov eax, dword [edi + 0x20]
mov edx, dword [eax + 4]
mov eax, edi
call fcn.0051018c
mov eax, dword [edi + 0x3c]
mov edx, dword [ebp + 0x10]
call fcn.0053522c
mov eax, dword [ebx + 8]
mov eax, dword [eax + 0x168]
mov edx, edi
call fcn.0041e9f0
mov eax, dword [ebp - 0xc]
cmp byte [eax + 0x1a9], 0
jne 0x51f20f
mov eax, dword [ebp + 0x10]
mov edx, dword [eax + 0x10]
mov eax, edi
call fcn.0050ffcc
mov eax, dword [ebx + 0x54]
mov edx, edi
call fcn.0041e9f0
mov eax, dword [edi + 0x1c]
call fcn.004336b0
cdq
xor eax, edx
sub eax, edx
mov edx, eax
mov eax, esi
call fcn.0053ab18
mov dword [ebx + 0x6c], eax
cmp byte [ebp + 8], 0
je 0x51f262
lea edx, [ebp - 0x12]
mov eax, esi
call fcn.0053abd8
mov edi, eax
mov dword [ebx + 0x84], edi
cmp byte [ebp - 0x12], 0
je 0x51f262
mov eax, edi
mov edx, 0x5a
call fcn.0053403c
mov dword [ebx + 0x88], eax
mov dl, 1
mov eax, dword [0x50e658]
call fcn.00404ab4
mov dword [ebx + 0x58], eax
mov dl, 1
mov eax, dword [0x50bb64]
call fcn.00404ab4
mov dword [ebx + 0x5c], eax
cmp dword [ebp + 0x18], 0
je 0x51f302
lea ecx, [ebp - 0x10]
mov dl, 0x7e
mov eax, dword [ebp + 0x18]
call fcn.00534f74
test al, al
je 0x51f2d3
lea edx, [ebp - 4]
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x14]
call fcn.0040ab90
mov eax, dword [ebp - 4]
mov edx, 0x51f3f4
call fcn.00405e6c
jne 0x51f2ba
mov byte [ebx + 0x69], 1
jmp 0x51f2d3
mov eax, dword [ebp - 4]
mov edx, 0x51f404
call fcn.00405e6c
jne 0x51f2cf
mov byte [ebx + 0x69], 2
jmp 0x51f2d3
mov byte [ebx + 0x69], 3
lea edx, [ebp - 0x18]
mov eax, dword [ebp + 0x18]
call fcn.00535090
cmp dword [ebp - 0x18], 0
je 0x51f302
lea edx, [ebp - 0x1c]
mov eax, dword [ebp + 0x18]
call fcn.00535090
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebx + 8]
mov eax, dword [eax + 0x188]
mov ecx, ebx
mov edi, dword [eax]
call dword [edi + 0x3c]
lea edx, [ebp - 0x11]
mov eax, esi
call fcn.0053a6f8
test al, al
je 0x51f317
movzx eax, byte [ebp - 0x11]
mov byte [ebx + 0x69], al
mov dl, 1
mov eax, dword [0x53335c]
call fcn.00404ab4
mov dword [ebx + 0x64], eax
lea eax, [ebp - 0x2c]
mov edx, 0x51f404
call fcn.004189a8
lea edx, [ebp - 0x2c]
lea eax, [esi + 0x78]
call fcn.0041a120
jne 0x51f346
mov byte [ebx + 0x68], 3
jmp 0x51f38a
lea eax, [ebp - 0x3c]
mov edx, 0x51f414
call fcn.004189a8
lea edx, [ebp - 0x3c]
lea eax, [esi + 0x78]
call fcn.0041a120
jne 0x51f366
mov byte [ebx + 0x68], 2
jmp 0x51f38a
lea eax, [ebp - 0x4c]
mov edx, 0x51f424
call fcn.004189a8
lea edx, [ebp - 0x4c]
lea eax, [esi + 0x78]
call fcn.0041a120
jne 0x51f386
mov byte [ebx + 0x68], 4
jmp 0x51f38a
mov byte [ebx + 0x68], 1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x51f3c7
lea eax, [ebp - 0x4c]
mov edx, dword [0x401128]
mov ecx, 3
call fcn.0040685c
lea eax, [ebp - 0x1c]
mov edx, 2
call fcn.00405a68
lea eax, [ebp - 4]
call fcn.00405a44
ret