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

Disassembly:
push 0xffffffffffffffff
push 0x581058
mov eax, dword fs:[0]
push eax
sub esp, 0x6c
push ebx
push ebp
push esi
push edi
mov eax, dword [0x61c948]
xor eax, esp
push eax
lea eax, [esp + 0x80]
mov dword fs:[0], eax
mov esi, ecx
mov ecx, dword [esi + 0x300]
cmp dword [ecx + 0xa0], 1
je 0x51bb52
cmp dword [ecx + 0xa0], 3
je 0x51bb52
cmp dword [ecx + 0xa0], 2
jne 0x51ba0e
push 1
lea eax, [esp + 0x44]
push eax
call fcn.00574070
test al, al
je 0x51bb8a
mov ecx, dword [esi + 0x300]
call fcn.004c5590
mov dword [esp + 0x28], edx
mov dl, byte [esp + 0x44]
test dl, 8
mov ebx, eax
je 0x51b9f4
test byte [esp + 0x41], 2
je 0x51b7f6
mov ecx, dword [esi + 0x300]
lea edx, [esp + 0x40]
push edx
call fcn.0051f310
mov dl, byte [esp + 0x44]
test dl, 8
je 0x51b9f4
mov eax, dword [esp + 0x42]
mov ecx, eax
and ecx, 0x1fff
cmp cx, 0x10
jb 0x51b9f4
cmp cx, 0x1fff
jae 0x51b9f4
test dl, 3
jne 0x51b9f4
and eax, 0x1fff
mov ebp, eax
xor eax, eax
test byte [esp + 0x41], 2
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], eax
mov dword [esp + 0x68], eax
mov dword [esp + 0x6c], eax
mov dword [esp + 0x70], eax
mov dword [esp + 0x74], eax
mov dword [esp + 0x78], eax
mov word [esp + 0x7c], ax
je 0x51b8d0
mov ecx, dword [esi + 0x300]
push eax
push 4
lea eax, [esp + 0x1c]
push eax
call fcn.00572170
test al, al
je 0x51b8d0
mov edx, dword [esp + 0x14]
mov ecx, dword [esi + 0x300]
push edx
lea eax, [esp + 0x64]
push eax
call fcn.00572610
test al, al
je 0x51b8d0
mov cl, byte [esp + 0x62]
and cl, 3
cmp cl, 2
jne 0x51b8a1
test byte [esp + 0x7b], 3
jne 0x51bc1a
mov edi, dword [esi + 0x300]
mov ecx, edi
call fcn.004c5590
mov ecx, dword [esp + 0x42]
mov edx, ebx
sub edx, eax
add edx, dword [esp + 0x47]
mov eax, dword [esp + 0x14]
push edx
and ecx, 0x1fff
push eax
push ecx
mov ecx, edi
call fcn.0051ebe0
mov ebp, eax
push ebp
mov ecx, esi
call fcn.004c3470
test eax, eax
je 0x51b9f4
push 0x40
call fcn.0044ff38
add esp, 4
test eax, eax
je 0x51b8f9
mov ecx, eax
call fcn.004aa990
mov edi, eax
jmp 0x51b8fb
xor edi, edi
mov dword [esp + 0x18], edi
mov dword [edi + 8], ebp
movzx edx, byte [esp + 0x62]
shr edx, 2
and edx, 1
mov dword [edi + 0x10], edx
movzx eax, byte [esp + 0x62]
shr eax, 2
not eax
and eax, 1
mov dword [edi + 0x14], eax
test byte [esp + 0x62], 4
mov dword [esp + 0x88], 1
je 0x51b94a
mov eax, dword [esp + 0x63]
sub eax, dword [esp + 0x90]
mov ecx, dword [esp + 0x67]
sbb ecx, dword [esp + 0x94]
jmp 0x51b951
xor eax, eax
mov ecx, SysReAllocString
mov dword [edi + 0x1c], ecx
mov edx, dword [edi + 0x1c]
mov ecx, eax
add ecx, 1
mov dword [edi + 0x18], eax
adc edx, 0
mov dword [edi + 0x20], ecx
mov dword [edi + 0x24], edx
mov ecx, dword [esi + 0x300]
push 0xffffffffffffffff
call fcn.004c5590
mov ecx, ebx
sub ecx, eax
add ecx, dword [esp + 0x4b]
push ecx
lea ecx, [edi + 0x28]
call fcn.00514000
mov ecx, dword [esi + 0x300]
mov edx, dword [edi + 0x2c]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x90], edx
call fcn.004c5590
mov ecx, eax
mov eax, dword [esp + 0x47]
mov ebp, edx
cdq
add eax, ebx
adc edx, dword [esp + 0x28]
sub eax, ecx
mov ecx, dword [esp + 0x1c]
sbb edx, ebp
push edx
mov edx, dword [esp + 0x94]
push eax
push edx
call fcn.004c5690
push ecx
mov eax, esp
mov ecx, esi
mov dword [esp + 0x94], esp
mov dword [esp + 0x1c], 0
mov dword [eax], edi
call fcn.004c4c10
lea ecx, [esp + 0x18]
mov dword [esp + 0x88], 0xffffffff
call fcn.005145d0
mov edx, dword [esp + 0x4f]
mov ecx, dword [esi + 0x300]
mov eax, dword [ecx]
mov eax, dword [eax + 8]
push edx
mov edx, dword [esp + 0x4f]
push edx
jmp 0x51bda8
cmp dword [ecx + 0xa0], 4
jne 0x51bdaa
push 1
lea edx, [esp + 0x34]
push edx
call fcn.005745f0
test al, al
je 0x51bb8a
mov ecx, dword [esi + 0x300]
movzx ebx, byte [esp + 0x32]
call fcn.004c5590
push ebx
mov ecx, esi
mov ebp, eax
mov dword [esp + 0x2c], edx
call fcn.004c3470
test eax, eax
je 0x51bb32
push 0x40
call fcn.0044ff38
add esp, 4
test eax, eax
je 0x51ba6e
mov ecx, eax
call fcn.004aa990
mov edi, eax
jmp 0x51ba70
xor edi, edi
mov dword [esp + 0x18], edi
mov dword [edi + 8], ebx
movzx eax, byte [esp + 0x35]
shr eax, 3
and eax, 1
mov dword [edi + 0x10], eax
movzx ecx, byte [esp + 0x35]
shr ecx, 3
not ecx
and ecx, 1
mov dword [edi + 0x14], ecx
test byte [esp + 0x35], 8
mov dword [esp + 0x88], 2
je 0x51babf
mov eax, dword [esp + 0x38]
sub eax, dword [esp + 0x90]
mov ecx, dword [esp + 0x3c]
sbb ecx, dword [esp + 0x94]
jmp 0x51bac6
xor eax, eax
mov ecx, SysReAllocString
mov dword [edi + 0x18], eax
mov edx, eax
mov eax, ecx
mov dword [edi + 0x1c], ecx
add edx, 1
adc eax, 0
mov dword [edi + 0x20], edx
mov dword [edi + 0x24], eax
movzx ecx, word [esp + 0x36]
push 0xffffffffffffffff
push ecx
lea ecx, [edi + 0x28]
call fcn.00514000
movzx eax, word [esp + 0x36]
mov ebx, dword [edi + 0x2c]
mov ecx, dword [esi + 0x300]
cdq
push edx
push eax
push ebx
call fcn.004c5690
push ecx
mov eax, esp
mov ecx, esi
mov dword [esp + 0x94], esp
mov dword [esp + 0x1c], 0
mov dword [eax], edi
call fcn.004c4c10
lea ecx, [esp + 0x18]
mov dword [esp + 0x88], 0xffffffff
call fcn.005145d0
movzx eax, word [esp + 0x36]
mov ecx, dword [esi + 0x300]
mov esi, dword [ecx]
cdq
add eax, ebp
adc edx, dword [esp + 0x28]
push edx
mov edx, dword [esi + 8]
push eax
call edx
jmp 0x51bdaa
push 0
push 0x10000
lea eax, [esp + 0x1c]
push eax
call fcn.00572170
test al, al
je 0x51bb8a
mov edx, dword [esp + 0x14]
cmp dl, 0xba
jne 0x51bb94
mov esi, dword [esi + 0x300]
lea ecx, [esp + 0x40]
push ecx
mov ecx, esi
call fcn.00572200
test al, al
jne 0x51bdaa
mov eax, 1
jmp 0x51bdac
cmp dl, 0xbb
jne 0x51bbbd
mov esi, dword [esi + 0x300]
lea edx, [esp + 0x24]
push edx
mov ecx, esi
call fcn.005724a0
test al, al
jne 0x51bdaa
mov eax, 1
jmp 0x51bdac
mov al, dl
add al, 0x43
cmp al, 0x32
ja 0x51bdaa
mov ecx, dword [esi + 0x300]
xor eax, eax
push edx
lea edx, [esp + 0x44]
push edx
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], eax
mov word [esp + 0x64], ax
call fcn.00572610
test al, al
je 0x51bb8a
cmp word [esp + 0x40], 0
je 0x51bb8a
mov al, byte [esp + 0x42]
and al, 3
cmp al, 2
jne 0x51bc24
test byte [esp + 0x5b], 3
je 0x51bc24
mov eax, 0x80004005
jmp 0x51bdac
mov ecx, dword [esi + 0x300]
call fcn.004c5590
mov ecx, dword [esi + 0x300]
mov ebp, edx
movzx edx, word [esp + 0x40]
mov ebx, eax
mov eax, dword [esp + 0x14]
push edx
push eax
push 0
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], ebp
call fcn.0051ebe0
push eax
mov ecx, esi
mov dword [esp + 0x20], eax
call fcn.004c3470
test eax, eax
je 0x51bd8f
push 0x40
call fcn.0044ff38
add esp, 4
test eax, eax
je 0x51bc80
mov ecx, eax
call fcn.004aa990
mov edi, eax
jmp 0x51bc82
xor edi, edi
mov dword [esp + 0x18], edi
mov ecx, dword [esp + 0x1c]
mov dword [edi + 8], ecx
movzx edx, byte [esp + 0x42]
shr edx, 2
and edx, 1
mov dword [edi + 0x10], edx
movzx eax, byte [esp + 0x42]
shr eax, 2
not eax
and eax, 1
mov dword [edi + 0x14], eax
test byte [esp + 0x42], 4
mov dword [esp + 0x88], 0
je 0x51bcd5
mov eax, dword [esp + 0x43]
sub eax, dword [esp + 0x90]
mov ecx, dword [esp + 0x47]
sbb ecx, dword [esp + 0x94]
jmp 0x51bcdc
xor eax, eax
mov ecx, SysReAllocString
mov dword [edi + 0x1c], ecx
mov edx, dword [edi + 0x1c]
mov ecx, eax
add ecx, 1
mov dword [edi + 0x18], eax
adc edx, 0
mov dword [edi + 0x20], ecx
mov dword [edi + 0x24], edx
mov ecx, dword [esi + 0x300]
push 0xffffffffffffffff
call fcn.004c5590
movzx ecx, word [esp + 0x44]
sub ecx, eax
add ecx, ebx
push ecx
lea ecx, [edi + 0x28]
call fcn.00514000
mov ecx, dword [esi + 0x300]
mov edx, dword [edi + 0x2c]
mov dword [esp + 0x20], ecx
mov dword [esp + 0x1c], edx
call fcn.004c5590
mov ebp, dword [esp + 0x28]
mov ecx, eax
mov eax, edx
mov dword [esp + 0x90], eax
movzx eax, word [esp + 0x40]
cdq
add eax, ebx
adc edx, ebp
sub eax, ecx
mov ecx, dword [esp + 0x90]
sbb edx, ecx
mov ecx, dword [esp + 0x20]
push edx
mov edx, dword [esp + 0x20]
push eax
push edx
call fcn.004c5690
push ecx
mov eax, esp
mov ecx, esi
mov dword [esp + 0x94], esp
mov dword [esp + 0x1c], 0
mov dword [eax], edi
call fcn.004c4c10
lea ecx, [esp + 0x18]
mov dword [esp + 0x88], 0xffffffff
call fcn.005145d0
mov ebx, dword [esp + 0x24]
movzx eax, word [esp + 0x40]
mov esi, dword [esi + 0x300]
mov edi, dword [esi]
cdq
add eax, ebx
adc edx, ebp
push edx
push eax
mov eax, dword [edi + 8]
mov ecx, esi
call eax
xor eax, eax
mov ecx, dword [esp + 0x80]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x78
ret 8