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

Disassembly:
sub esp, 0x1c
push ebx
mov ebx, ecx
mov ecx, eax
shr eax, 1
push ebp
and eax, 1
push esi
not ecx
mov dword [esp + 0x24], eax
mov eax, dword [ebx + 4]
push edi
xor edi, edi
and ecx, 1
xor ebp, ebp
cmp eax, 0x28
mov dword [esp + 0x1c], edi
mov dword [esp + 0x20], edi
mov dword [esp + 0x18], edi
mov dword [esp + 0x24], ecx
mov dword [esp + 0x14], 0x400
jle 0x10050009
add eax, 7
and eax, 0xfffffff8
mov dword [esp + 0x10], eax
jmp 0x10050015
mov dword [esp + 0x10], 0x28
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x30]
mov dword [ecx], edi
mov ecx, dword [esp + 0x34]
cmp ecx, edi
je 0x100500e3
cmp byte [ecx], 0
je 0x100500e3
mov esi, dword [ebx + 8]
inc esi
lea edx, [esi + esi]
push edx
call fcn.100410c0
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x1005023c
mov edx, dword [esp + 0x34]
mov edi, str.:memory:
mov eax, edx
mov cl, byte [eax]
cmp cl, byte [edi]
jne 0x10050075
test cl, cl
je 0x10050071
mov cl, byte [eax + 1]
cmp cl, byte [edi + 1]
jne 0x10050075
add eax, 2
add edi, 2
test cl, cl
jne 0x10050055
xor eax, eax
jmp 0x1005007a
sbb eax, eax
sbb eax, 0xffffffff
mov byte [ebp], 0
test eax, eax
jne 0x10050090
mov esi, dword [esp + 0x1c]
mov dword [esp + 0x18], 1
jmp 0x1005009e
mov eax, dword [ebx + 0x24]
push ebp
push esi
push edx
push ebx
call eax
add esp, 0x10
mov esi, eax
cmp byte [ebp], 0
mov edi, ebp
je 0x100500ac
inc edi
cmp byte [edi], 0
jne 0x100500a6
sub edi, ebp
and edi, 0x3fffffff
test esi, esi
jne 0x100500cc
lea ecx, [edi + 8]
cmp ecx, dword [ebx + 8]
jle 0x100500df
mov dword [esp + 0x1c], 0xe
mov esi, dword [esp + 0x1c]
push ebp
call fcn.10036090
add esp, 4
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret
mov eax, dword [esp + 0x10]
mov edx, dword [ebx + 4]
add edx, 7
add eax, edi
and edx, 0xfffffff8
lea eax, [edx + eax*2 + 0xea]
push eax
mov dword [esp + 0x20], eax
call fcn.100410c0
mov esi, eax
add esp, 4
test esi, esi
je 0x10050233
mov eax, dword [esp + 0x1c]
push eax
push 0
push esi
call fcn.100ae530
lea eax, [esi + 0xb0]
mov dword [esi + 0xa8], eax
add eax, 0x30
mov dword [esi + 0x38], eax
mov ecx, dword [ebx + 4]
add ecx, 7
and ecx, 0xfffffff8
add eax, ecx
mov ecx, dword [esp + 0x1c]
mov dword [esi + 0x40], eax
add eax, ecx
mov dword [esi + 0x3c], eax
add eax, ecx
add esp, 0xc
mov dword [esi + 0x84], eax
test ebp, ebp
je 0x100501aa
push edi
lea edx, [eax + edi + 1]
push ebp
push eax
mov dword [esi + 0x88], edx
call fcn.100ae5b0
mov eax, dword [esi + 0x88]
push edi
push ebp
push eax
call fcn.100ae5b0
mov eax, dword [esi + 0x88]
mov ecx, dword [str._journal]
mov dword [edi + eax], ecx
mov edx, dword [0x100f71bc]
mov dword [edi + eax + 4], edx
mov eax, dword [esi + 0x84]
add esp, 0x18
cmp byte [eax], 0
jne 0x100501a1
mov ecx, dword [esi + 0x88]
mov byte [ecx], 0
push ebp
call fcn.10036090
add esp, 4
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x3c]
mov dword [esi], ebx
mov dword [esi + 0x78], eax
test ecx, ecx
je 0x10050252
cmp byte [ecx], 0
je 0x10050252
cmp dword [esp + 0x18], 0
jne 0x10050252
mov ecx, dword [esi + 0x38]
mov edx, dword [esi + 0x84]
lea edi, [esp + 0x1c]
push edi
and eax, 0x7f1f
push eax
push ecx
push edx
mov edx, dword [ebx + 0x18]
push ebx
mov dword [esp + 0x30], 0
call edx
mov edi, eax
mov eax, dword [esp + 0x30]
and eax, 1
add esp, 0x14
mov dword [esp + 0x34], eax
test edi, edi
jne 0x1005027e
test eax, eax
jne 0x10050263
call fcn.10039530
mov eax, dword [esi + 0x70]
cmp eax, 0x400
jbe 0x10050263
mov bl, byte [esp + 0x20]
cmp eax, 0x2000
jbe 0x10050249
mov dword [esp + 0x14], 0x2000
jmp 0x10050267
push ebp
call fcn.10036090
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 7
pop ebx
add esp, 0x1c
ret
movzx eax, ax
mov dword [esp + 0x14], eax
jmp 0x10050267
mov ebx, 1
and eax, ebx
mov byte [esi + 0xe], 4
mov dword [esp + 0x34], eax
jmp 0x10050267
mov bl, byte [esp + 0x20]
lea ecx, [esp + 0x14]
push 0xffffffffffffffff
push ecx
mov edi, esi
call fcn.10042c10
mov edi, eax
add esp, 8
test edi, edi
je 0x100502a9
mov ebx, dword [esi + 0x38]
mov eax, dword [ebx]
test eax, eax
je 0x10050296
mov edx, dword [eax + 4]
push ebx
call edx
add esp, 4
mov dword [ebx], 0
push esi
call fcn.10036090
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret
mov ebp, dword [esp + 0x38]
mov edi, dword [esi + 0xa8]
push 0x30
push 0
add ebp, 7
push edi
and ebp, 0xfffffff8
call fcn.100ae530
movzx eax, word [esp + 0x20]
xor ecx, ecx
mov dword [edi + 0x14], eax
mov eax, dword [esp + 0x24]
add esp, 0xc
test eax, eax
sete cl
mov edx, eax
neg edx
sbb edx, edx
not edx
and edx, 0x1004fef0
cmp dword [esp + 0x28], 0
mov dword [edi + 0x1c], ecx
mov cl, byte [esp + 0x24]
mov dword [edi + 0x18], ebp
mov dword [edi + 0x20], edx
mov dword [edi + 0x24], esi
mov dword [edi + 0x10], 0x64
mov byte [esi + 6], cl
je 0x10050316
cmp dword [esp + 0x34], 0
je 0x10050316
mov ecx, 1
jmp 0x10050318
xor ecx, ecx
mov dl, byte [esp + 0x34]
mov byte [esi + 0x15], al
mov byte [esi + 0xd], al
test bl, bl
sete al
mov byte [esi + 9], al
mov eax, 0xffffffff
mov byte [esi + 7], cl
mov dword [esi + 0x80], 0x3fffffff
mov byte [esi + 0xb], bl
mov byte [esi + 4], bl
mov byte [esi + 0x12], bl
mov byte [esi + 0xc], dl
mov byte [esi + 8], bl
mov byte [esi + 0xa], 2
mov word [esi + 0x74], bp
mov dword [esi + 0xa0], eax
mov dword [esi + 0xa4], eax
call fcn.10039530
cmp dword [esp + 0x24], 0
jne 0x10050371
mov byte [esi + 5], 2
jmp 0x1005037c
cmp dword [esp + 0x18], 0
je 0x1005037c
mov byte [esi + 5], 4
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x30]
pop edi
mov dword [esi + 0x94], ecx
mov dword [edx], esi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x1c
ret