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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x164
push ebx
push esi
push edi
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x90]
mov eax, dword [eax + 0x14]
mov dword [ebp - 4], eax
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x24], 0
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0xd8]
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x28], 0
mov word [ebp - 6], 0
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x78]
cmp eax, 0
je 0x51b2f7
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x78]
mov eax, dword [eax + 0x10]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x78]
mov eax, dword [eax + 0x18]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x78]
mov eax, dword [eax + 0x14]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 8]
cmp dword [eax + 0x40], 0
je 0x51b310
mov dword [ebp - 0x10], 0
jmp 0x51b33a
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp - 4]
push eax
mov eax, dword [eax]
call dword [eax + 0x74]
add esp, 8
mov word [ebp - 6], ax
movzx eax, word [ebp - 6]
cmp eax, 0
je 0x51b33a
movzx eax, word [ebp - 6]
jmp 0x51bcb9
mov eax, dword [ebp - 0x10]
push eax
mov eax, dword [ebp + 8]
push eax
call fcn.0051aa09
add esp, 8
mov dword [ebp - 0x1c], eax
mov edx, dword [ebp - 4]
mov dword [edx + 0x150], eax
mov eax, dword [ebp - 0x1c]
mov edx, dword [ebp + 0xc]
mov dword [eax + 0x14], edx
mov eax, dword [ebp - 0x10]
cmp eax, 0
jne 0x51b3b3
push 0
mov eax, dword [ebp + 8]
push eax
call fcn.005123ca
add esp, 8
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x2c]
cmp eax, 0
je 0x51b3a8
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 0x2c]
mov edx, dword [edx]
mov dword [eax + 0x68], edx
mov eax, dword [ebp - 0x2c]
push eax
mov eax, dword [ebp + 8]
push eax
call fcn.0051203e
add esp, 8
jmp 0x51bc9a
mov word [ebp - 6], 1
jmp 0x51bc9a
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x14c]
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x40], 0
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0xd0]
mov dword [ebp - 0x150], eax
mov dword [ebp - 0x2c], 0
mov eax, dword [0x7c2174]
mov dword [ebp - 0x14c], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x8c]
mov dword [0x7c2174], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x10]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp + 8]
movzx eax, word [eax + 0x70]
cmp eax, 0
je 0x51b429
push 0
call fcn.0049f730
add esp, 4
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x78]
mov edx, eax
cmp edx, 0
je 0x51b444
cmp dword [eax + 0x34], 0
je 0x51b456
mov eax, dword [ebp - 4]
mov dword [eax + 0x14c], 0
jmp 0x51b542
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x78]
mov eax, dword [eax + 0x24]
cmp eax, 0
je 0x51b47d
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x78]
mov eax, dword [eax + 0x24]
push eax
call fcn.0049ffd0
add esp, 4
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x44]
cmp eax, 0
je 0x51b495
mov dword [ebp - 0x30], 1
jmp 0x51b542
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x78]
cmp dword [eax + 0x28], 0
jne 0x51b4af
cmp dword [eax + 0x20], 0
jle 0x51b509
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x78]
mov eax, dword [eax + 0x1c]
cmp eax, 0
je 0x51b4d6
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x78]
mov eax, dword [eax + 0x1c]
push eax
call fcn.0049ffd0
add esp, 4
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x44]
cmp eax, 0
jne 0x51b4e8
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x78]
cmp dword [eax + 0x20], 0
jle 0x51b542
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x78]
mov eax, dword [eax + 0x20]
mov dword [ebp - 0x30], eax
jmp 0x51b542
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x78]
cmp dword [eax + 0x4c], 0
je 0x51b525
mov dword [ebp - 0x40], 1
jmp 0x51b542
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x78]
cmp dword [eax + 0x3c], 0
jne 0x51b542
mov eax, dword [ebp - 4]
mov dword [eax + 0x14c], 0
cmp dword [0x7d7fc8], 0
jne 0x51b592
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x78]
mov ecx, edx
cmp ecx, 0
je 0x51b583
cmp dword [edx + 0x34], 0
jne 0x51b583
mov eax, dword [eax + 0x14c]
cmp eax, 0
jne 0x51b592
cmp dword [ebp - 0x40], 0
jne 0x51b592
mov dword [ebp - 0x154], 1
jmp 0x51b59c
mov dword [ebp - 0x154], 0
mov eax, dword [ebp - 0x154]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x1c]
mov dword [eax + 0x1d0], 0x40
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x158], eax
mov edx, dword [eax + 0x1d0]
shl edx, 0xa
push edx
call fcn.0049b580
add esp, 4
mov edx, dword [ebp - 0x158]
mov dword [edx + 0x1cc], eax
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax + 0x1d0]
mov eax, eax
shl eax, 0xa
mov ecx, dword [ebp - 4]
movzx ecx, word [ecx + 0xa2]
xor edx, edx
div ecx
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x44]
cmp eax, 0
jne 0x51b61d
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x14c]
cmp eax, 0
jne 0x51b61d
mov dword [ebp - 0x44], 1
mov eax, dword [ebp - 0x44]
cmp eax, 0
jne 0x51b63e
mov eax, dword [ebp - 4]
push eax
mov eax, dword [eax]
call dword [eax + 0x18]
add esp, 4
mov word [ebp - 6], ax
jmp 0x51b67b
mov eax, dword [ebp - 0x44]
push eax
mov eax, dword [ebp - 4]
push eax
mov eax, dword [eax]
call dword [eax + 0x10]
add esp, 8
mov word [ebp - 6], ax
cmp dword [ebp - 0x40], 0
je 0x51b67b
movzx eax, word [ebp - 6]
cmp eax, 0
jne 0x51b67b
push 1
mov eax, dword [ebp - 4]
push eax
mov eax, dword [eax]
call dword [eax + 0x24]
add esp, 8
mov word [ebp - 6], ax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0xd8]
mov dword [ebp - 0xc], eax
jmp 0x51bbed
cmp dword [ebp - 0x34], 0
je 0x51b860
mov eax, dword [ebp - 0x10]
cmp dword [ebp - 0xc], eax
jbe 0x51b6a7
jmp 0x51bc07
mov eax, dword [ebp - 0x2c]
cmp eax, 0
je 0x51b6bc
cmp eax, dword [ebp - 0x38]
jl 0x51b78b
mov eax, dword [ebp - 0x10]
sub eax, dword [ebp - 0xc]
mov edx, dword [ebp - 0x38]
cmp eax, edx
jb 0x51b6d8
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x3c], eax
jmp 0x51b6e4
mov eax, dword [ebp - 0x10]
sub eax, dword [ebp - 0xc]
lea eax, [eax + 1]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x30]
cmp eax, 0
je 0x51b701
mov edx, dword [ebp - 0x3c]
cmp eax, edx
jae 0x51b701
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x3c], eax
push 0
mov eax, dword [ebp - 4]
mov dword [ebp - 0x15c], eax
mov edx, dword [ebp - 0xc]
lea edx, [edx - 1]
mov ecx, edx
xor ebx, ebx
movzx edx, word [eax + 0xa2]
mov esi, edx
mov edi, edx
sar edi, 0x1f
push ebx
push ecx
push edi
push esi
call fcn.00533b40
mov ecx, dword [ebp - 0x15c]
movzx ecx, word [ecx + 0xa0]
mov ecx, ecx
mov ebx, ecx
sar ebx, 0x1f
add ecx, eax
adc ebx, edx
push ebx
push ecx
mov eax, dword [ebp - 0x15c]
mov eax, dword [eax + 0x90]
push eax
call fcn.004b04b0
add esp, 0x10
mov eax, dword [ebp - 4]
movzx edx, word [eax + 0xa2]
imul edx, dword [ebp - 0x3c]
push edx
mov edx, dword [ebp - 0x1c]
mov edx, dword [edx + 0x1cc]
push edx
mov eax, dword [eax + 0x90]
push eax
call fcn.004af8b0
add esp, 0xc
mov dword [ebp - 0x2c], 0
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 0x2c]
movzx ecx, word [eax + 0xa2]
imul edx, ecx
mov ecx, dword [ebp - 0x1c]
mov ecx, dword [ecx + 0x1cc]
lea edx, [ecx + edx]
mov dword [eax + 0xd0], edx
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 0xc]
mov dword [eax + 0xd8], edx
push 0
mov eax, dword [ebp - 4]
push eax
mov eax, dword [eax]
call dword [eax + 0x54]
add esp, 8
movzx eax, ax
cmp eax, 1
jne 0x51b7d8
jmp 0x51bc07
mov eax, dword [ebp - 4]
mov dword [eax + 0x100], 1
mov dword [eax + 0xfc], 1
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0xd0]
movzx edx, byte [edx]
cmp edx, 0x2a
jne 0x51b813
mov dword [ebp - 0x15c], 1
jmp 0x51b81d
mov dword [ebp - 0x15c], 0
mov edx, dword [ebp - 0x15c]
mov dword [eax + 0x10c], edx
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x7c]
cmp eax, 0
je 0x51b85d
mov eax, dword [ebp - 4]
push eax
mov eax, dword [eax]
call dword [eax + 0xd4]
add esp, 4
mov word [ebp - 6], ax
movzx eax, word [ebp - 6]
cmp eax, 0
je 0x51b85d
jmp 0x51bc07
inc dword [ebp - 0x2c]
mov eax, dword [ebp - 0x14]
mov edx, eax
cmp edx, 0
je 0x51b889
push 0
push eax
push 0
call fcn.00510c0b
add esp, 0xc
cmp eax, 0
jne 0x51b889
jmp 0x51bc07
mov eax, dword [ebp - 0x10]
cmp dword [ebp - 0xc], eax
ja 0x51bb11
mov eax, dword [ebp - 0x18]
mov edx, eax
cmp edx, 0
je 0x51b8bb
push 0
push eax
mov eax, dword [ebp - 4]
push eax
call fcn.00510c0b
add esp, 0xc
cmp eax, 0
je 0x51bb11
mov eax, dword [ebp + 8]
movzx eax, word [eax + 0x70]
cmp eax, 0
je 0x51b8ec
mov eax, dword [ebp - 0x24]
push eax
mov eax, dword [ebp + 8]
movzx eax, word [eax + 0x70]
push eax
mov eax, dword [ebp - 4]
push eax
mov eax, dword [eax]
call dword [eax + 0x58]
add esp, 0xc
mov word [ebp - 6], ax
jmp 0x51b8fe
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0xc]
push eax
call fcn.00469e30
add esp, 4
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x24]
push eax
call fcn.004a0870
add esp, 4
mov dword [ebp - 0x15c], eax
mov eax, dword [ebp - 0x15c]
cmp eax, 0x20
je 0x51ba3b
cmp eax, 0x20
jg 0x51b968
mov eax, dword [ebp - 0x15c]
cmp eax, 8
je 0x51b9f1
cmp eax, 8
jg 0x51b954
mov eax, dword [ebp - 0x15c]
cmp eax, 2
je 0x51b9f1
jmp 0x51bad0
mov eax, dword [ebp - 0x15c]
cmp eax, 0x10
je 0x51b9f1
jmp 0x51bad0
mov eax, dword [ebp - 0x15c]
cmp eax, 0x400
je 0x51b9b0
cmp eax, 0x400
jg 0x51b99a
mov eax, dword [ebp - 0x15c]
cmp eax, 0x80
je 0x51ba72
jmp 0x51bad0
mov eax, dword [ebp - 0x15c]
cmp eax, 0xc00
je 0x51b9b0
jmp 0x51bad0
mov eax, dword [ebp - 0x24]
push eax
call fcn.0049f8d0
add esp, 4
mov dword [ebp - 0x160], eax
mov edx, dword [ebp - 0x24]
push edx
call fcn.0049f900
add esp, 4
push eax
mov eax, dword [ebp - 0x160]
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0xd8]
push eax
mov eax, dword [ebp - 0x1c]
push eax
call fcn.0051a94d
add esp, 0x10
jmp 0x51bb11
mov eax, dword [ebp + 8]
movzx edx, word [eax + 0x74]
push edx
movzx eax, word [eax + 0x72]
push eax
lea eax, [ebp - 0x148]
push eax
mov eax, dword [ebp - 0x24]
push eax
call fcn.00510485
add esp, 0x10
mov eax, dword [ebp + 8]
movzx eax, word [eax + 0x72]
push eax
lea eax, [ebp - 0x148]
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0xd8]
push eax
mov eax, dword [ebp - 0x1c]
push eax
call fcn.0051a94d
add esp, 0x10
jmp 0x51bb11
lea eax, [ebp - 0x148]
push eax
mov eax, dword [ebp - 0x24]
push eax
call fcn.0049f9a0
add esp, 8
push 8
lea eax, [ebp - 0x148]
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0xd8]
push eax
mov eax, dword [ebp - 0x1c]
push eax
call fcn.0051a94d
add esp, 0x10
jmp 0x51bb11
mov eax, dword [ebp - 0x24]
push eax
call fcn.0049fc50
add esp, 4
cmp eax, 0
je 0x51ba96
mov dword [ebp - 0x164], 0x54
jmp 0x51baa0
mov dword [ebp - 0x164], 0x46
mov eax, dword [ebp - 0x164]
mov byte [ebp - 0x148], al
push 1
lea eax, [ebp - 0x148]
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0xd8]
push eax
mov eax, dword [ebp - 0x1c]
push eax
call fcn.0051a94d
add esp, 0x10
jmp 0x51bb11
push 0
push 0
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x90]
mov eax, dword [eax]
push eax
push 0x402
push 0x21
mov eax, dword [ebp - 4]
push eax
call fcn.005103ae
add esp, 0x18
mov word [ebp - 6], 1
mov eax, dword [ebp + 8]
mov dword [eax + 0x48], 1
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x30], 1
mov eax, dword [ebp - 0x30]
cmp eax, 0
je 0x51bb34
mov eax, dword [ebp - 0x30]
lea eax, [eax - 1]
mov dword [ebp - 0x30], eax
cmp eax, 0
jne 0x51bb34
jmp 0x51bc07
mov eax, dword [ebp - 0x20]
cmp eax, 0
je 0x51bb86
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x78]
mov eax, dword [eax + 0x18]
cmp dword [ebp - 0x28], eax
jl 0x51bb83
mov dword [ebp - 0x28], 0
push 0
mov eax, dword [ebp - 0x20]
push eax
mov eax, dword [ebp - 4]
push eax
call fcn.00510c0b
add esp, 0xc
cmp eax, 0
jne 0x51bb83
mov eax, dword [ebp + 8]
mov dword [eax + 0x48], 1
jmp 0x51bc07
inc dword [ebp - 0x28]
cmp dword [ebp - 0x34], 0
je 0x51bb99
add dword [ebp - 0xc], 1
jmp 0x51bbed
movzx eax, word [ebp - 6]
cmp eax, 0
jne 0x51bbed
push 1
mov eax, dword [ebp - 4]
push eax
mov eax, dword [eax]
call dword [eax + 0x28]
add esp, 8
mov word [ebp - 6], ax
cmp dword [ebp - 0x40], 0
je 0x51bbe1
movzx eax, word [ebp - 6]
cmp eax, 0
jne 0x51bbe1
push 1
mov eax, dword [ebp - 4]
push eax
mov eax, dword [eax]
call dword [eax + 0x24]
add esp, 8
mov word [ebp - 6], ax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0xd8]
mov dword [ebp - 0xc], eax
movzx eax, word [ebp - 6]
cmp eax, 0
jne 0x51bc07
mov eax, dword [ebp - 4]
cmp dword [eax + 0x28], 0
je 0x51b68c
cmp dword [ebp - 0x34], 0
je 0x51bc4e
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 0x150]
mov dword [eax + 0xd0], edx
mov eax, dword [ebp - 4]
mov dword [eax + 0xfc], 0
movzx eax, word [ebp - 6]
cmp eax, 0
jne 0x51bc4e
mov eax, dword [ebp - 0xc]
push eax
mov eax, dword [ebp - 4]
push eax
mov eax, dword [eax]
call dword [eax + 0x10]
add esp, 8
mov word [ebp - 6], ax
movzx eax, word [ebp - 6]
cmp eax, 0
jne 0x51bc67
mov eax, dword [ebp - 0x1c]
push eax
call fcn.0051ade3
add esp, 4
mov eax, dword [ebp + 8]
movzx eax, word [eax + 0x70]
cmp eax, 0
je 0x51bc83
mov eax, dword [ebp - 0x24]
push eax
call fcn.0049f7d0
add esp, 4
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 0x48]
mov dword [eax + 0x14c], edx
mov eax, dword [ebp - 0x14c]
mov dword [0x7c2174], eax
push 1
mov eax, dword [ebp - 0x1c]
push eax
call fcn.0051acb9
add esp, 8
mov eax, dword [ebp - 4]
mov dword [eax + 0x150], 0
movzx eax, word [ebp - 6]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret