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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov ecx, eax
push ebx
shr eax, 1
and eax, 1
push esi
mov esi, dword [ebp + 8]
not ecx
mov dword [ebp - 0x20], eax
mov eax, dword [esi + 4]
push edi
xor edi, edi
and ecx, 1
xor ebx, ebx
mov dword [ebp - 4], edi
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x10], edi
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0xc], 0x400
cmp eax, 0x28
jle 0x10040708
add eax, 7
and eax, 0xfffffff8
mov dword [ebp - 8], eax
jmp 0x10040712
mov dword [ebp - 8], 0x28
mov eax, dword [ebp - 8]
mov ecx, dword [ebp + 0xc]
mov dword [ecx], edi
mov ecx, dword [ebp + 0x10]
cmp ecx, edi
je 0x100407d9
cmp byte [ecx], bl
je 0x100407d9
mov ebx, dword [esi + 8]
inc ebx
lea edx, [ebx + ebx]
push edx
call fcn.10037920
mov edi, eax
add esp, 4
test edi, edi
je 0x10040904
mov eax, dword [ebp + 0x10]
mov ecx, str.:memory:
lea esp, [esp]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x10040770
test dl, dl
je 0x1004076c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x10040770
add eax, 2
add ecx, 2
test dl, dl
jne 0x10040750
xor eax, eax
jmp 0x10040775
sbb eax, eax
sbb eax, 0xffffffff
mov byte [edi], 0
test eax, eax
jne 0x10040785
mov dword [ebp - 0x10], 1
jmp 0x10040797
mov eax, dword [ebp + 0x10]
mov ecx, dword [esi + 0x24]
push edi
push ebx
push eax
push esi
call ecx
add esp, 0x10
mov dword [ebp - 4], eax
cmp byte [edi], 0
mov ebx, edi
je 0x100407a6
mov edi, edi
inc ebx
cmp byte [ebx], 0
jne 0x100407a0
sub ebx, edi
and ebx, 0x3fffffff
cmp dword [ebp - 4], 0
jne 0x100407c3
lea edx, [ebx + 8]
cmp edx, dword [esi + 8]
jle 0x100407d6
mov dword [ebp - 4], 0xe
push edi
call fcn.10037c20
mov eax, dword [ebp - 4]
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 8]
mov ecx, dword [esi + 4]
add ecx, 7
add eax, ebx
and ecx, 0xfffffff8
lea eax, [ecx + eax*2 + 0xea]
push eax
mov dword [ebp - 4], eax
call fcn.10037920
mov esi, eax
add esp, 4
test esi, esi
je 0x100408fb
mov edx, dword [ebp - 4]
push edx
push 0
push esi
call fcn.100b8f90
mov ecx, dword [ebp + 8]
lea eax, [esi + 0xb0]
mov dword [esi + 0xa8], eax
add eax, 0x30
mov dword [esi + 0x38], eax
mov edx, dword [ecx + 4]
add edx, 7
and edx, 0xfffffff8
add eax, edx
mov edx, dword [ebp - 8]
mov dword [esi + 0x40], eax
add eax, edx
mov dword [esi + 0x3c], eax
add eax, edx
add esp, 0xc
mov dword [esi + 0x84], eax
test edi, edi
je 0x10040892
push ebx
lea ecx, [eax + ebx + 1]
push edi
push eax
mov dword [esi + 0x88], ecx
call fcn.100b6420
mov edx, dword [esi + 0x88]
add esp, 0xc
push ebx
push edi
push edx
call fcn.100b6420
mov eax, dword [esi + 0x88]
mov ecx, dword [str._journal]
mov dword [eax + ebx], ecx
mov edx, dword [0x100f072c]
add esp, 0xc
push edi
mov dword [eax + ebx + 4], edx
call fcn.10037c20
mov ecx, dword [ebp + 8]
add esp, 4
mov eax, dword [ebp + 0x10]
mov edi, dword [ebp + 0x14]
mov dword [esi], ecx
mov dword [esi + 0x78], edi
test eax, eax
je 0x10040918
cmp byte [eax], 0
je 0x10040918
cmp dword [ebp - 0x10], 0
jne 0x10040918
mov eax, dword [esi + 0x38]
mov edx, dword [esi + 0x84]
lea ebx, [ebp + 0x10]
push ebx
push edi
push eax
mov eax, dword [ecx + 0x18]
push edx
push ecx
mov dword [ebp + 0x10], 0
call eax
mov ebx, dword [ebp + 0x10]
mov edi, eax
add esp, 0x14
and ebx, 1
test edi, edi
jne 0x1004093a
test ebx, ebx
jne 0x10040926
call fcn.1003f9c0
mov eax, dword [esi + 0x70]
cmp eax, 0x400
jbe 0x10040926
cmp eax, 0x2000
jbe 0x10040910
mov dword [ebp - 0xc], 0x2000
jmp 0x10040926
push edi
call fcn.10037c20
add esp, 4
mov eax, 7
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
movzx ecx, ax
mov dword [ebp - 0xc], ecx
jmp 0x10040926
mov ebx, dword [ebp - 0x18]
mov dword [ebp - 0x14], 1
mov byte [esi + 0xe], 4
lea edx, [ebp - 0xc]
push edx
mov edi, esi
call fcn.1003ff10
mov edi, eax
add esp, 4
test edi, edi
je 0x10040964
mov ebx, dword [esi + 0x38]
mov eax, dword [ebx]
test eax, eax
je 0x10040952
mov eax, dword [eax + 4]
push ebx
call eax
add esp, 4
mov dword [ebx], 0
push esi
call fcn.10037c20
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, dword [esi + 0xa8]
push 0x30
push 0
push edi
call fcn.100b8f90
movzx ecx, word [ebp - 0xc]
xor edx, edx
mov dword [edi + 0x14], ecx
mov ecx, dword [ebp - 0x10]
add esp, 0xc
test ecx, ecx
sete dl
mov eax, ecx
neg eax
sbb eax, eax
not eax
and eax, 0x100405d0
cmp dword [ebp - 0x20], 0
mov dword [edi + 0x1c], edx
mov edx, dword [ebp - 0x1c]
mov dword [edi + 0x18], 0x50
mov dword [edi + 0x20], eax
mov dword [edi + 0x24], esi
mov dword [edi + 0x10], 0x64
mov byte [esi + 6], dl
je 0x100409c3
test ebx, ebx
je 0x100409c3
mov eax, 1
jmp 0x100409c5
xor eax, eax
mov byte [esi + 7], al
mov al, byte [ebp - 0x14]
mov byte [esi + 0x15], cl
mov dword [esi + 0x80], 0x3fffffff
mov byte [esi + 0xb], al
mov byte [esi + 4], al
mov byte [esi + 0x12], al
mov byte [esi + 0xd], cl
mov byte [esi + 0xc], bl
test al, al
jne 0x100409f3
test edx, edx
je 0x100409f3
xor eax, eax
jmp 0x100409f8
mov eax, 1
test al, al
sete cl
mov byte [esi + 8], al
or eax, 0xffffffff
mov byte [esi + 9], cl
mov byte [esi + 0xa], 2
mov dword [esi + 0x74], 0x50
mov dword [esi + 0xa0], eax
mov dword [esi + 0xa4], eax
call fcn.1003f9c0
cmp dword [ebp - 0x10], 0
je 0x10040a2c
mov byte [esi + 5], 4
mov edx, dword [ebp + 0xc]
pop edi
mov dword [edx], esi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret