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

Disassembly:
sub esp, 0x2c
mov eax, dword [esp + 0x30]
push ebp
mov ebp, ecx
push esi
mov ecx, eax
push edi
mov esi, dword [ebp + 0x10]
mov dword [ebp + 0x10], eax
sub ecx, esi
and ecx, 3
test cl, 1
mov dword [esp + 0x14], ecx
je 0x51e834
mov al, byte [ebp + 7]
mov cl, byte [ebp + 8]
mov dl, byte [ebp + 9]
mov byte [ebp + 8], cl
mov byte [ebp + 7], dl
mov byte [ebp + 9], al
mov eax, dword [ebp + 0x2c]
mov dword [esp + 0xc], 0
test eax, eax
je 0x51e91e
mov eax, dword [0xb07d30]
mov edi, dword [eax]
mov eax, dword [0xb084b8]
test eax, eax
jne 0x51e87e
mov ecx, dword [str.Null_Pointer]
push ecx
push 0x158
push str.._sys_mem_memman.h
call fcn.00401090
mov eax, dword [0xb084b8]
add esp, 0xc
test eax, eax
jne 0x51e87e
call fcn.0052ff20
mov esi, dword [0xb084b8]
mov ecx, edi
call fcn.0052c150
push eax
mov ecx, esi
call fcn.00533cd0
mov eax, dword [ebp + 0x30]
lea edx, [eax + eax*2]
mov eax, dword [0xb084b8]
test eax, eax
lea esi, [edx*4 - 0x18]
jne 0x51e8cf
mov eax, dword [str.Null_Pointer]
push eax
push 0x158
push str.._sys_mem_memman.h
call fcn.00401090
mov eax, dword [0xb084b8]
add esp, 0xc
test eax, eax
jne 0x51e8cf
call fcn.0052ff20
mov ecx, dword [0xb084b8]
push 0
push 1
push esi
call fcn.00533b80
mov dword [esp + 0xc], eax
mov eax, dword [0xb084b8]
test eax, eax
jne 0x51e913
mov ecx, dword [str.Null_Pointer]
push ecx
push 0x158
push str.._sys_mem_memman.h
call fcn.00401090
mov eax, dword [0xb084b8]
add esp, 0xc
test eax, eax
jne 0x51e913
call fcn.0052ff20
mov ecx, dword [0xb084b8]
call fcn.00533d40
mov eax, dword [ebp + 0x34]
mov dword [esp + 0x10], 0
test eax, eax
jbe 0x51ea8a
lea edx, [ebp + 0x14]
push ebx
mov dword [esp + 0x40], edx
mov ebx, 0xffffffe8
test ebx, ebx
jge 0x51e948
lea edi, [esp + ebx + 0x3c]
jmp 0x51e94f
mov eax, dword [esp + 0x10]
lea edi, [ebx + eax]
test ebx, ebx
jge 0x51e959
mov esi, dword [esp + 0x40]
jmp 0x51e95e
mov esi, dword [ebp + 0x2c]
add esi, ebx
mov ecx, esi
mov edx, edi
mov eax, dword [ecx]
mov dword [edx], eax
mov eax, dword [ecx + 4]
mov dword [edx + 4], eax
mov ecx, dword [ecx + 8]
mov byte [esp + 0x1c], 0
mov dword [edx + 8], ecx
mov al, byte [ebp + 0xc]
test al, 2
mov byte [esp + 0x1d], 0
mov byte [esp + 0x1e], 0
mov byte [esp + 0x1f], 0
mov byte [esp + 0x20], 0
mov byte [esp + 0x21], 0
je 0x51e9e2
mov eax, dword [0xb07d30]
mov edx, dword [esi + 8]
mov eax, dword [eax + 0x78]
test eax, eax
je 0x51e9b5
mov ecx, dword [eax + 4]
cmp dword [ecx + 0x38], edx
je 0x51e9b7
mov eax, dword [eax + 8]
test eax, eax
jne 0x51e9a6
xor ecx, ecx
add ecx, 4
mov edx, dword [ecx]
mov dword [esp + 0x1c], edx
mov ax, word [ecx + 4]
mov word [esp + 0x20], ax
mov al, byte [esi + 3]
test al, 1
je 0x51e9ef
mov al, byte [esp + 0x1f]
mov cl, byte [esp + 0x21]
mov byte [esp + 0x1f], cl
mov byte [esp + 0x21], al
jmp 0x51e9ef
mov ecx, dword [esi + 8]
lea edx, [esp + 0x1c]
push edx
call fcn.0052bac0
mov eax, dword [esp + 0x18]
cmp eax, 3
ja case.default.0x51e9f8
jmp dword [eax*4 + 0x51eaec]
mov cl, byte [esi]
mov byte [edi], cl
mov dl, byte [esi + 2]
jmp 0x51ea4d
mov cl, byte [esi + 2]
mov byte [edi], cl
mov dl, byte [ebp + 9]
mov cl, byte [esi]
sub dl, cl
mov cl, byte [esp + 0x1f]
sub dl, cl
jmp 0x51ea4d
mov cl, byte [ebp + 7]
mov dl, byte [esi]
sub cl, dl
mov dl, byte [esp + 0x1f]
sub cl, dl
mov byte [edi], cl
mov dl, byte [ebp + 9]
mov cl, byte [esi + 2]
sub dl, cl
mov cl, byte [esp + 0x21]
sub dl, cl
jmp 0x51ea4d
mov cl, byte [ebp + 7]
mov dl, byte [esi + 2]
sub cl, dl
mov dl, byte [esp + 0x21]
sub cl, dl
mov byte [edi], cl
mov dl, byte [esi]
mov byte [edi + 2], dl
mov cl, byte [esi + 1]
add ebx, 0xc
mov byte [edi + 1], cl
mov dl, byte [esi + 3]
add dl, al
and dl, 3
mov byte [edi + 3], dl
mov eax, dword [esi + 8]
mov edx, dword [esp + 0x40]
mov dword [edi + 8], eax
mov eax, dword [esp + 0x14]
mov ecx, dword [ebp + 0x34]
inc eax
add edx, 0xc
cmp eax, ecx
mov dword [esp + 0x14], eax
mov dword [esp + 0x40], edx
jb 0x51e93e
pop ebx
mov esi, dword [ebp + 0x2c]
test esi, esi
je 0x51eacd
mov eax, dword [0xb084b8]
test eax, eax
jne 0x51eac1
mov ecx, dword [str.Null_Pointer]
push ecx
push 0x158
push str.._sys_mem_memman.h
call fcn.00401090
mov eax, dword [0xb084b8]
add esp, 0xc
test eax, eax
jne 0x51eac1
call fcn.0052ff20
mov ecx, dword [0xb084b8]
push esi
call fcn.00533cb0
mov edx, dword [esp + 0xc]
lea edi, [ebp + 0x14]
mov ecx, 6
lea esi, [esp + 0x20]
mov dword [ebp + 0x2c], edx
rep movsd dword es:[edi], dword [esi]
pop edi
pop esi
pop ebp
add esp, 0x2c
ret 4