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

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0xc
push 0
push 0
dec ecx
jne 0x51ec50
push ecx
push ebx
push esi
push edi
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x51f553
push dword fs:[eax]
mov dword fs:[eax], esp
cmp dword [ebp - 8], 0
setne byte [ebp - 0x15]
cmp byte [ebp - 0x15], 0
je 0x51ec85
mov eax, dword [ebp - 4]
mov edx, dword [eax]
call dword [edx + 0x4c]
xor eax, eax
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 8]
mov dword [eax + 0x16c], edx
mov dl, 1
mov eax, dword [0x42b040]
call fcn.0042c7f4
mov edx, dword [ebp - 4]
mov dword [edx + 0x158], eax
xor edx, edx
push ebp
push 0x51f4f0
push dword fs:[edx]
mov dword fs:[edx], esp
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x138]
mov edx, dword [eax]
call dword [edx + 0x3c]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x138]
mov edx, dword [eax]
call dword [edx + 0x50]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x138]
mov edx, dword [eax]
call dword [edx + 0x60]
mov edx, dword [ebp - 4]
mov dword [edx + 0x140], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x140]
test eax, eax
jne 0x51ed02
mov edx, dword [ebp - 4]
cmp byte [edx + 0x5c], 0
jne 0x51ed0a
test eax, eax
je 0x51f4bb
mov eax, dword [ebp - 4]
cmp byte [eax + 0x3e], 0
je 0x51ed69
mov eax, dword [ebp - 4]
mov edx, dword [eax]
call dword [edx + 0x5c]
test al, al
je 0x51ed69
mov eax, dword [ebp - 4]
test byte [eax + 0x34], 4
je 0x51ed37
mov eax, dword [ebp - 4]
mov dword [eax + 0x164], 2
jmp 0x51ed44
mov eax, dword [ebp - 4]
mov dword [eax + 0x164], 1
mov eax, dword [ebp - 4]
test byte [eax + 0x35], 8
je 0x51ed74
mov eax, dword [ebp - 4]
call fcn.0051cde0
call fcn.00421260
test eax, eax
jle 0x51ed74
mov eax, dword [ebp - 4]
inc dword [eax + 0x164]
jmp 0x51ed74
mov eax, dword [ebp - 4]
xor edx, edx
mov dword [eax + 0x164], edx
mov eax, dword [ebp - 4]
call fcn.0051c30c
mov edx, dword [eax]
call dword [edx + 0x14]
mov ebx, eax
mov eax, dword [ebp - 4]
add ebx, dword [eax + 0x164]
mov eax, dword [ebp - 4]
add ebx, dword [eax + 0x140]
mov eax, dword [ebp - 4]
call fcn.0051c320
mov edx, dword [eax]
call dword [edx + 0x14]
add ebx, eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0xbc]
mov dword [eax + 4], ebx
xor esi, esi
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0xd4]
mov ecx, dword [ebp - 0x14]
mov eax, dword [ebp - 4]
mov ebx, dword [eax]
call dword [ebx + 0x98]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0xbc]
mov eax, dword [eax + 0x14]
mov dword [ebp - 0x10], eax
jmp 0x51f48b
mov eax, dword [ebp - 4]
cmp byte [eax + 0x44], 0
je 0x51ee03
lea ecx, [ebp - 0x28]
mov edx, 8
mov eax, dword [ebp - 4]
call fcn.0051b428
mov edx, dword [ebp - 0x28]
mov ecx, esi
mov eax, dword [ebp - 4]
call fcn.0051d554
mov byte [ebp - 0x16], 1
mov eax, dword [ebp - 4]
cmp word [eax + 0x6a], 0
je 0x51ee20
lea ecx, [ebp - 0x16]
mov ebx, dword [ebp - 4]
mov edx, dword [ebp - 4]
mov eax, dword [ebx + 0x6c]
call dword [ebx + 0x68]
cmp byte [ebp - 0x16], 0
je 0x51f44d
mov eax, dword [ebp - 4]
cmp word [eax + 0xa2], 0
je 0x51ee77
mov byte [ebp - 0x17], 0
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x138]
mov edx, dword [eax]
call dword [edx + 0x60]
push eax
lea eax, [ebp - 0x17]
push eax
mov ebx, dword [ebp - 4]
mov ecx, esi
mov edx, dword [ebp - 4]
mov eax, dword [ebx + 0xa4]
call dword [ebx + 0xa0]
cmp byte [ebp - 0x17], 0
je 0x51ee77
mov dl, 1
mov eax, dword [ebp - 4]
call fcn.0051d688
jmp 0x51f4bb
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x38]
test ecx, ecx
jle 0x51eeae
test esi, esi
jle 0x51eeae
mov eax, esi
cdq
idiv ecx
test edx, edx
jne 0x51eeae
inc dword [ebp - 0x14]
cmp dword [ebp - 8], 0
jne 0x51eeae
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0xd4]
mov ecx, dword [ebp - 0x14]
mov eax, dword [ebp - 4]
mov ebx, dword [eax]
call dword [ebx + 0x98]
inc esi
mov eax, dword [ebp - 4]
cmp byte [eax + 0x114], 2
je 0x51eec8
xor edx, edx
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
call dword [ecx + 0x88]
xor eax, eax
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 4]
call fcn.0051cdc8
call fcn.00421260
dec eax
test eax, eax
jl 0x51f3fb
inc eax
mov dword [ebp - 0x20], eax
xor ebx, ebx
mov eax, dword [ebp - 4]
call fcn.0051cdc8
mov edx, ebx
call fcn.00515bec
cmp byte [eax + 0x21], 0
je 0x51f3f1
mov eax, dword [ebp - 4]
call fcn.0051cdc8
mov edx, ebx
call fcn.00515bec
mov edi, eax
mov eax, dword [edi + 0x10]
mov edx, dword [ebp - 4]
mov dword [edx + 0x15c], eax
mov edx, dword [edi + 0x1c]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x158]
mov ecx, dword [eax]
call dword [ecx + 8]
mov al, byte [edi + 0x20]
mov edx, dword [ebp - 4]
mov byte [edx + 0x148], al
cmp byte [edi + 0x29], 0
jne 0x51ef81
mov edx, esi
dec edx
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x138]
mov ecx, dword [eax]
call dword [ecx + 0x48]
test al, al
je 0x51ef81
mov eax, dword [ebp - 4]
call fcn.0051cdc8
mov edx, ebx
call fcn.00515bec
mov edx, eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x138]
mov ecx, dword [eax]
call dword [ecx + 0x70]
mov edx, dword [ebp - 4]
mov dword [edx + 0x154], eax
jmp 0x51ef8c
mov eax, dword [ebp - 4]
xor edx, edx
mov dword [eax + 0x154], edx
mov eax, dword [ebp - 4]
cmp dword [eax + 0x154], 0
je 0x51efe1
lea ecx, [ebp - 0x2c]
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x154]
mov eax, dword [ebp - 4]
mov edi, dword [eax]
call dword [edi + 0x3c]
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 4]
add eax, 0x14c
call fcn.00404cb4
mov eax, dword [ebp - 4]
mov cl, byte [eax + 0x45]
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x154]
mov eax, dword [ebp - 4]
call fcn.0051c45c
mov edx, dword [ebp - 4]
mov byte [edx + 0x150], al
jmp 0x51f11d
mov eax, dword [ebp - 4]
call fcn.0051cdc8
mov edx, ebx
call fcn.00515bec
cmp byte [eax + 0x29], 1
jne 0x51f035
mov eax, dword [ebp - 4]
call fcn.0051cdc8
mov edx, ebx
call fcn.00515bec
mov edx, dword [eax + 0xc]
mov eax, dword [ebp - 4]
add eax, 0x14c
call fcn.00404cb4
mov eax, dword [ebp - 4]
call fcn.0051cdc8
mov edx, ebx
call fcn.00515bec
mov al, byte [eax + 0x28]
mov edx, dword [ebp - 4]
mov byte [edx + 0x150], al
jmp 0x51f11d
mov eax, dword [ebp - 4]
call fcn.0051cdc8
mov edx, ebx
call fcn.00515bec
cmp byte [eax + 0x29], 2
jne 0x51f097
mov eax, dword [ebp - 4]
call fcn.0051cdc8
mov edx, ebx
call fcn.00515bec
mov edx, dword [eax + 0xc]
lea ecx, [ebp - 0x3c]
mov eax, dword [ebp - 4]
call fcn.0051c4c4
lea edx, [ebp - 0x3c]
mov eax, dword [ebp - 4]
add eax, 0x14c
call fcn.00405f4c
mov eax, dword [ebp - 4]
call fcn.0051cdc8
mov edx, ebx
call fcn.00515bec
mov al, byte [eax + 0x28]
mov edx, dword [ebp - 4]
mov byte [edx + 0x150], al
jmp 0x51f11d
mov eax, dword [ebp - 4]
call fcn.0051cdc8
mov edx, ebx
call fcn.00515bec
mov edx, eax
lea ecx, [ebp - 0x50]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x138]
mov edi, dword [eax]
call dword [edi + 0x58]
lea eax, [ebp - 0x50]
lea edx, [ebp - 0x40]
call fcn.00418868
mov edx, dword [ebp - 0x40]
mov eax, dword [ebp - 4]
add eax, 0x14c
call fcn.00404cb4
mov eax, dword [ebp - 4]
call fcn.0051cdc8
mov edx, ebx
call fcn.00515bec
mov edx, eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x138]
mov ecx, dword [eax]
call dword [ecx + 0x64]
push eax
lea eax, [ebp - 0x60]
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0x14c]
call fcn.00405fb0
lea edx, [ebp - 0x60]
mov eax, dword [ebp - 4]
mov cl, byte [eax + 0x45]
pop eax
call fcn.005154ac
mov edx, dword [ebp - 4]
mov byte [edx + 0x150], al
mov eax, dword [ebp - 4]
call fcn.0051c30c
mov edx, dword [eax]
call dword [edx + 0x14]
mov edx, eax
mov eax, dword [ebp - 4]
add edx, dword [eax + 0x164]
add edx, esi
mov eax, dword [ebp - 4]
lea ecx, [eax + 0x15c]
mov eax, dword [ebp - 4]
call fcn.0051c430
mov eax, dword [ebp - 4]
cmp word [eax + 0x7a], 0
je 0x51f195
mov eax, dword [ebp - 4]
add eax, 0x14c
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x158]
push eax
mov eax, dword [ebp - 4]
add eax, 0x148
push eax
mov eax, dword [ebp - 4]
add eax, 0x15c
push eax
mov eax, dword [ebp - 4]
add eax, 0x150
push eax
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x154]
mov edi, dword [ebp - 4]
mov edx, dword [ebp - 4]
mov eax, dword [edi + 0x7c]
call dword [edi + 0x78]
mov eax, dword [ebp - 4]
cmp byte [eax + 0x36], 1
jne 0x51f1c1
lea ecx, [ebp - 0x64]
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x14c]
mov al, 1
call fcn.0051a930
mov edx, dword [ebp - 0x64]
mov eax, dword [ebp - 4]
add eax, 0x14c
call fcn.00404cb4
mov eax, dword [ebp - 4]
mov al, byte [eax + 0x114]
dec al
je 0x51f2fa
dec al
jne 0x51f355
xor edx, edx
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
call dword [ecx + 0x88]
mov eax, dword [ebp - 4]
call fcn.0051cdc8
mov edx, ebx
call fcn.00515bec
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 4]
test byte [eax + 0x34], 0x40
je 0x51f212
lea eax, [ebp - 0x1c]
mov edx, dword [ebp - 0x24]
mov edx, dword [edx + 0xc]
call fcn.00404cf8
jmp 0x51f223
lea eax, [ebp - 0x1c]
mov edx, dword [ebp - 0x24]
mov edx, dword [edx + 0x24]
mov edx, dword [edx + 4]
call fcn.00404cf8
mov eax, dword [ebp - 4]
cmp byte [eax + 0x3e], 0
je 0x51f292
mov eax, dword [ebp - 4]
test byte [eax + 0x34], 4
je 0x51f292
mov eax, dword [ebp - 0x10]
push eax
push 0
mov eax, dword [ebp - 0x1c]
push eax
mov eax, dword [ebp - 0x24]
mov edi, dword [eax + 0x24]
mov al, byte [edi + 0xc]
push eax
mov eax, dword [edi + 0x10]
push eax
mov eax, dword [edi + 8]
push eax
mov cl, 3
xor edx, edx
mov eax, dword [ebp - 4]
mov edi, dword [eax]
call dword [edi + 0x90]
mov eax, dword [ebp - 4]
test byte [eax + 0x34], 4
je 0x51f292
mov eax, dword [ebp - 0x10]
push eax
push 1
push 0
mov eax, dword [ebp - 0x24]
mov edi, dword [eax + 0x24]
mov al, byte [edi + 0xc]
push eax
mov eax, dword [edi + 0x10]
push eax
mov eax, dword [edi + 8]
push eax
xor ecx, ecx
xor edx, edx
mov eax, dword [ebp - 4]
mov edi, dword [eax]
call dword [edi + 0x90]
mov eax, dword [ebp - 0x10]
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x164]
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x14c]
push eax
mov eax, dword [ebp - 4]
mov al, byte [eax + 0x148]
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x158]
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x15c]
push eax
mov eax, dword [ebp - 4]
mov cl, byte [eax + 0x150]
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x154]
mov eax, dword [ebp - 4]
mov edi, dword [eax]
call dword [edi + 0x90]
xor edx, edx
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
call dword [ecx + 0x8c]
inc dword [ebp - 0x10]
jmp 0x51f3ee
mov eax, dword [ebp - 0xc]
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0xbc]
mov eax, dword [eax + 0x14]
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x14c]
push eax
mov eax, dword [ebp - 4]
mov al, byte [eax + 0x148]
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x158]
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x15c]
push eax
mov eax, dword [ebp - 4]
mov cl, byte [eax + 0x150]
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x154]
mov eax, dword [ebp - 4]
mov edi, dword [eax]
call dword [edi + 0x90]
jmp 0x51f3ee
mov eax, dword [ebp - 4]
add eax, 0x148
push eax
mov eax, dword [ebp - 4]
add eax, 0x158
push eax
mov eax, dword [ebp - 4]
add eax, 0x15c
push eax
mov eax, dword [ebp - 4]
call fcn.0051c938
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0xbc]
mov edx, dword [edx + 0x14]
sub edx, eax
inc edx
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x138]
mov ecx, dword [ebp - 0xc]
mov edi, dword [eax]
call dword [edi + 0x5c]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0xbc]
mov eax, dword [eax + 0x14]
push eax
mov eax, dword [ebp - 0xc]
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x14c]
push eax
mov eax, dword [ebp - 4]
mov al, byte [eax + 0x148]
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x158]
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x15c]
push eax
mov eax, dword [ebp - 4]
mov cl, byte [eax + 0x150]
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x154]
mov eax, dword [ebp - 4]
mov edi, dword [eax]
call dword [edi + 0x90]
inc dword [ebp - 0xc]
inc ebx
dec dword [ebp - 0x20]
jne 0x51eee9
mov eax, dword [ebp - 4]
cmp byte [eax + 0x114], 2
je 0x51f416
xor edx, edx
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
call dword [ecx + 0x8c]
jmp 0x51f44d
mov eax, dword [ebp - 4]
test byte [eax + 0x34], 4
je 0x51f44d
mov eax, dword [ebp - 4]
mov al, byte [eax + 0xb8]
sub al, 2
je 0x51f430
sub al, 0xc
jne 0x51f44d
xor edx, edx
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
call dword [ecx + 0x88]
xor edx, edx
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
call dword [ecx + 0x8c]
inc dword [ebp - 0x10]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x138]
mov edx, dword [eax]
call dword [edx + 0x54]
inc dword [ebp - 0x10]
mov byte [ebp - 0x17], 0
mov eax, dword [ebp - 4]
cmp word [eax + 0x72], 0
je 0x51f47b
lea ecx, [ebp - 0x17]
mov ebx, dword [ebp - 4]
mov edx, dword [ebp - 4]
mov eax, dword [ebx + 0x74]
call dword [ebx + 0x70]
cmp byte [ebp - 0x17], 0
je 0x51f48b
mov dl, 1
mov eax, dword [ebp - 4]
call fcn.0051d688
mov eax, dword [ebp - 4]
call fcn.0051d670
test al, al
jne 0x51f4bb
mov edx, esi
mov eax, dword [ebp - 4]
call fcn.0051cef4
test al, al
je 0x51f4bb
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x138]
mov edx, dword [eax]
call dword [edx + 0x4c]
test al, al
je 0x51eddd
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x138]
mov edx, dword [eax]
call dword [edx + 0x40]
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x51f4f7
mov eax, dword [ebp - 4]
mov edx, dword [eax]
call dword [edx + 0x9c]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x158]
call fcn.00403d90
ret