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

Disassembly:
sub esp, 0x3c
push ebx
push ebp
xor edx, edx
push esi
mov esi, eax
mov ecx, 4
mov eax, 2
push edi
mov ebx, 1
mov edi, 8
mov dword [esp + 0x30], edx
mov dword [esp + 0x34], ecx
mov dword [esp + 0x38], edx
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], edx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x48], edx
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], edi
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], ebx
mov dword [esi + 0x78], edx
call fcn.004ff6d0
cmp byte [esi + 0x123], 0
je 0x507c5e
test byte [esi + 0x70], 2
jne 0x507bf6
mov eax, dword [esi + 0xcc]
add eax, 7
shr eax, 3
mov dword [esi + 0xd0], eax
jmp 0x507c02
mov ecx, dword [esi + 0xcc]
mov dword [esi + 0xd0], ecx
movzx eax, byte [esi + 0x124]
mov ebp, dword [esi + 0xc8]
add eax, eax
add eax, eax
mov ecx, dword [esp + eax + 0x14]
mov edx, ebp
sub edx, dword [esp + eax + 0x30]
lea eax, [edx + ecx - 1]
xor edx, edx
div ecx
mov cl, byte [esi + 0x129]
cmp cl, 8
movzx ecx, cl
mov dword [esi + 0xe0], eax
jb 0x507c4a
shr ecx, 3
imul ecx, eax
lea eax, [ecx + 1]
mov dword [esi + 0xdc], eax
jmp 0x507c84
imul ecx, eax
add ecx, 7
shr ecx, 3
lea eax, [ecx + 1]
mov dword [esi + 0xdc], eax
jmp 0x507c84
mov ecx, dword [esi + 0xd8]
mov eax, dword [esi + 0xcc]
mov ebp, dword [esi + 0xc8]
add ecx, ebx
mov dword [esi + 0xd0], eax
mov dword [esi + 0xe0], ebp
mov dword [esi + 0xdc], ecx
mov ebx, dword [esi + 0x70]
test bl, 4
movzx eax, byte [esi + 0x129]
je 0x507c9e
cmp byte [esi + 0x127], 8
jae 0x507c9e
mov eax, edi
mov edi, ebx
and edi, 0x1000
je 0x507d08
mov cl, byte [esi + 0x126]
cmp cl, 3
jne 0x507cc8
xor eax, eax
cmp word [esi + 0x11a], ax
setne al
lea eax, [eax*8 + 0x18]
jmp 0x507d08
test cl, cl
jne 0x507ce4
cmp eax, 8
jge 0x507cd6
mov eax, 8
cmp word [esi + 0x11a], 0
je 0x507d08
add eax, eax
jmp 0x507d08
cmp cl, 2
jne 0x507d08
cmp word [esi + 0x11a], 0
je 0x507d08
lea ecx, [eax*4]
mov eax, 0x55555556
imul ecx
mov eax, edx
shr eax, 0x1f
add eax, edx
mov edx, ebx
and edx, 0x8000
je 0x507d53
mov cl, byte [esi + 0x126]
cmp cl, 3
jne 0x507d24
mov eax, 0x20
jmp 0x507d53
test cl, cl
jne 0x507d3b
xor ecx, ecx
cmp eax, 8
setg cl
sub ecx, 1
and ecx, 0xfffffff0
add ecx, 0x20
jmp 0x507d51
cmp cl, 2
jne 0x507d53
xor ecx, ecx
cmp eax, 0x20
setg cl
sub ecx, 1
and ecx, 0xffffffe0
add ecx, 0x40
mov eax, ecx
test ebx, 0x4000
je 0x507db2
cmp word [esi + 0x11a], 0
je 0x507d69
test edi, edi
jne 0x507d9f
test edx, edx
jne 0x507d9f
mov cl, byte [esi + 0x126]
cmp cl, 4
je 0x507d9f
cmp eax, 8
jg 0x507d8e
xor eax, eax
cmp cl, 6
sete al
lea eax, [eax*8 + 0x18]
jmp 0x507db2
sub cl, 6
neg cl
sbb ecx, ecx
and ecx, 0xfffffff0
add ecx, 0x40
mov eax, ecx
jmp 0x507db2
xor edx, edx
cmp eax, 0x10
setg dl
sub edx, 1
and edx, 0xffffffe0
add edx, 0x40
mov eax, edx
test ebx, 0x100000
je 0x507dcb
movzx ecx, byte [esi + 0x65]
movzx edx, byte [esi + 0x64]
imul ecx, edx
cmp ecx, eax
jle 0x507dcb
mov eax, ecx
lea edx, [ebp + 7]
and edx, 0xfffffff8
cmp eax, 8
mov ecx, eax
jl 0x507de0
shr ecx, 3
imul ecx, edx
jmp 0x507de9
imul ecx, edx
add ecx, 7
shr ecx, 3
add eax, 7
sar eax, 3
lea eax, [eax + ecx + 0x41]
test eax, eax
je 0x507e33
mov ecx, dword [esi + 0x248]
test ecx, ecx
push eax
je 0x507e0a
push esi
call ecx
add esp, 8
jmp 0x507e12
call fcn.005786ac
add esp, 4
mov edi, eax
test edi, edi
jne 0x507e2f
test dword [esi + 0x6c], 0x100000
jne 0x507e2f
push esi
mov ecx, str.Out_of_Memory_
call fcn.004f99a0
add esp, 4
mov eax, edi
jmp 0x507e35
xor eax, eax
mov dword [esi + 0x250], eax
add eax, 0x20
cmp dword [esi + 0xd8], 0xfffffffe
mov dword [esi + 0xec], eax
jbe 0x507e5b
push esi
mov ecx, str.Row_has_too_many_bytes_to_allocate_in_memory.
call fcn.004f99a0
add esp, 4
mov eax, dword [esi + 0xd8]
add eax, 1
je 0x507ea2
mov ecx, dword [esi + 0x248]
test ecx, ecx
push eax
je 0x507e79
push esi
call ecx
add esp, 8
jmp 0x507e81
call fcn.005786ac
add esp, 4
mov edi, eax
test edi, edi
jne 0x507e9e
test dword [esi + 0x6c], 0x100000
jne 0x507e9e
push esi
mov ecx, str.Out_of_Memory_
call fcn.004f99a0
add esp, 4
mov ecx, edi
jmp 0x507ea4
xor ecx, ecx
mov eax, dword [esi + 0xd8]
add eax, 1
push eax
push 0
push ecx
mov dword [esi + 0xe8], ecx
call fcn.00580260
add esp, 0xc
or dword [esi + 0x6c], 0x40
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret