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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [ebp + 0x10]
not eax
and eax, 1
push ebx
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0x10]
push esi
shr eax, 1
push edi
xor ebx, ebx
and eax, 1
push 0x28
mov dword [ebp + 0x10], eax
pop eax
mov dword [ebp - 0x24], edx
mov edx, ebx
mov edi, ebx
mov dword [ebp - 4], ecx
mov esi, ebx
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x18], edi
mov dword [ebp - 8], edx
mov dword [ebp - 0xc], 0x400
mov dword [ebp - 0x14], eax
cmp dword [ecx + 4], eax
jle 0x40d770
mov eax, dword [ecx + 4]
add eax, 7
and eax, 0xfffffff8
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x24]
mov dword [eax], ebx
mov eax, dword [ebp + 8]
test eax, eax
je 0x40d7f4
cmp byte [eax], dl
je 0x40d7f4
mov eax, dword [ecx + 8]
inc eax
mov dword [ebp - 8], eax
add eax, eax
push eax
call fcn.00407453
mov edi, eax
pop ecx
mov dword [ebp - 0x18], edi
test edi, edi
jne 0x40d7a1
push 7
pop eax
jmp 0x40da0d
push 9
push str.:memory:
push dword [ebp + 8]
call fcn.00557855
add esp, 0xc
mov byte [edi], bl
test eax, eax
jne 0x40d7c2
mov dword [ebp - 0x10], 1
jmp 0x40d7d5
mov eax, dword [ebp - 4]
push edi
push dword [ebp - 8]
push dword [ebp + 8]
push eax
call dword [eax + 0x24]
add esp, 0x10
mov esi, eax
mov ecx, edi
call fcn.0040905a
mov edx, eax
mov dword [ebp - 8], edx
test esi, esi
jne 0x40d818
mov eax, dword [ebp - 4]
lea ecx, [edx + 8]
cmp ecx, dword [eax + 8]
jle 0x40d7f6
push 0xe
jmp 0x40d817
mov eax, ecx
mov eax, dword [eax + 4]
mov esi, dword [ebp - 0x14]
add eax, 7
lea ecx, [esi + 0x75]
and eax, 0xfffffff8
add ecx, edx
lea ecx, [eax + ecx*2]
call fcn.00407827
mov ecx, eax
test ecx, ecx
jne 0x40d826
push 7
pop esi
push edi
call fcn.0040767a
pop ecx
mov eax, esi
jmp 0x40da0d
mov edx, dword [ebp - 4]
mov edi, ecx
add ecx, 0xb0
mov dword [edi + 0xa8], ecx
add ecx, 0x30
mov dword [edi + 0x38], ecx
mov eax, dword [edx + 4]
add eax, 7
and eax, 0xfffffff8
add ecx, eax
mov dword [edi + 0x40], ecx
add ecx, esi
mov dword [edi + 0x3c], ecx
add ecx, esi
mov esi, dword [ebp - 0x18]
mov dword [edi + 0x84], ecx
test esi, esi
je 0x40d8ae
mov edx, dword [ebp - 8]
push edx
lea eax, [edx + 1]
add eax, ecx
push esi
push ecx
mov dword [edi + 0x88], eax
call fcn.0055a9c0
add esp, 0xc
push dword [ebp - 8]
push esi
push dword [edi + 0x88]
call fcn.0055a9c0
mov ecx, dword [edi + 0x88]
mov eax, dword [str._journal]
mov edx, dword [ebp - 8]
add esp, 0xc
mov dword [ecx + edx], eax
mov eax, dword [0x5b23bc]
push esi
mov dword [ecx + edx + 4], eax
call fcn.0040767a
mov edx, dword [ebp - 4]
pop ecx
mov ecx, dword [ebp + 8]
mov eax, dword [ebp + 0x14]
mov dword [edi], edx
mov dword [edi + 0x78], eax
test ecx, ecx
je 0x40d916
cmp byte [ecx], bl
je 0x40d916
cmp dword [ebp - 0x10], ebx
jne 0x40d916
lea ecx, [ebp + 8]
push ecx
push eax
push dword [edi + 0x38]
mov dword [ebp + 8], ebx
push dword [edi + 0x84]
push edx
call dword [edx + 0x18]
mov esi, eax
mov eax, dword [ebp + 8]
and eax, 1
add esp, 0x14
mov dword [ebp + 0x14], eax
test esi, esi
jne 0x40d938
test eax, eax
jne 0x40d925
mov ecx, edi
call fcn.0040cd5f
cmp dword [edi + 0x70], 0x400
jbe 0x40d925
mov eax, 0x2000
cmp dword [edi + 0x70], eax
jbe 0x40d910
mov dword [ebp - 0xc], eax
jmp 0x40d925
movzx eax, word [edi + 0x70]
jmp 0x40d90b
xor edx, edx
inc edx
and eax, edx
mov dword [ebp - 0x1c], edx
mov byte [edi + 0xe], 4
mov dword [ebp + 0x14], eax
push 0xffffffffffffffff
lea edx, [ebp - 0xc]
mov ecx, edi
call fcn.0040d1be
mov esi, eax
pop ecx
test esi, esi
je 0x40d945
mov ecx, dword [edi + 0x38]
call fcn.00406d7b
jmp 0x40d818
mov esi, dword [edi + 0xa8]
push 0x30
push ebx
push esi
call fcn.00558fd0
movzx eax, word [ebp - 0xc]
mov edx, dword [ebp - 0x10]
add esp, 0xc
mov dword [esi + 0x14], eax
push 0x50
pop eax
mov dword [esi + 0x18], eax
xor eax, eax
test edx, edx
sete al
mov ecx, 0x40d664
mov dword [esi + 0x24], edi
mov dword [esi + 0x10], 0x64
mov dword [esi + 0x1c], eax
xor eax, eax
test edx, edx
cmove eax, ecx
mov dword [esi + 0x20], eax
mov eax, dword [ebp - 0x20]
mov byte [edi + 6], al
mov eax, dword [ebp + 0x14]
cmp dword [ebp + 0x10], ebx
je 0x40d9a1
test eax, eax
je 0x40d9a1
xor ecx, ecx
inc ecx
jmp 0x40d9a3
mov ecx, ebx
mov byte [edi + 7], cl
mov ecx, dword [ebp - 0x1c]
mov byte [edi + 0x15], dl
mov dword [edi + 0x80], 0x3fffffff
mov byte [edi + 0xb], cl
mov byte [edi + 4], cl
mov byte [edi + 0x12], cl
mov byte [edi + 0xd], dl
mov byte [edi + 0xc], al
test cl, cl
jne 0x40d9ce
cmp dword [ebp - 0x20], ebx
jne 0x40d9d1
xor ebx, ebx
inc ebx
test bl, bl
sete al
or dword [edi + 0xa0], 0xffffffff
or dword [edi + 0xa4], 0xffffffff
mov byte [edi + 9], al
push 0x50
pop eax
mov ecx, edi
mov byte [edi + 8], bl
mov byte [edi + 0xa], 2
mov word [edi + 0x74], ax
call fcn.0040cd5f
cmp dword [ebp - 0x10], 0
je 0x40da06
mov byte [edi + 5], 4
mov eax, dword [ebp - 0x24]
mov dword [eax], edi
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret