Function at 0x40e039
Capabilities:
Check if file exists
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x5c
push ebx
push esi
xor esi, esi
mov dword [ebp - 0xc], edx
mov dword [ebp - 0x20], esi
mov ebx, ecx
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x10], esi
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x50], esi
mov dword [ebp - 0x34], esi
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x44], esi
mov dword [ebp - 0x40], esi
mov dword [ebp - 4], esi
mov dword [ebp - 0x3c], esi
mov dword [ebp - 0x54], esi
push edi
mov edi, esi
test dl, 0x10
je 0x40e094
mov al, dl
and al, 0x40
movzx ecx, al
neg ecx
sbb ecx, ecx
not ecx
and ecx, 3
call fcn.0040fab3
mov esi, edx
mov eax, edx
and esi, 1
mov ecx, esi
neg ecx
sbb ecx, ecx
and eax, 0x100
and ecx, 0xb
add ecx, 0x6e
neg eax
push ecx
sbb eax, eax
and eax, 0xb
add eax, 0x6e
push eax
mov eax, edx
and al, 0x80
movzx eax, al
neg eax
sbb eax, eax
and eax, 0xb
add eax, 0x6e
push eax
mov eax, edx
and al, 0x20
movzx eax, al
neg eax
sbb eax, eax
and eax, 0xb
add eax, 0x6e
push eax
mov eax, edx
and al, 8
movzx eax, al
neg eax
sbb eax, eax
and eax, 0xb
add eax, 0x6e
push eax
mov eax, edx
and al, 4
movzx eax, al
neg eax
sbb eax, eax
and eax, 0xb
add eax, 0x6e
push eax
push ecx
push 0x403808
push 2
call fcn.0040fadc
add esp, 0x24
test esi, esi
je 0x40e122
and dword [ebp - 0xc], 0xfffffef3
mov dword [ebp - 0x18], 1
lea edx, [ebp - 0x5c]
mov ecx, ebx
call fcn.0040f268
test eax, eax
jne 0x40e13d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
jmp 0x40ea12
lea eax, [ebp - 0x44]
mov ecx, 0x420010
push eax
push 1
push 4
pop edx
call fcn.0040fd03
test eax, eax
je 0x40ea02
mov ecx, dword [ebp - 0x44]
lea edx, [ebp - 0x40]
call fcn.0040fbba
test eax, eax
je 0x40ea02
and dword [ebp - 8], edi
lea ecx, [ebp - 0x5c]
mov edx, 0x4038e0
call fcn.0041064c
test eax, eax
je 0x40e186
mov dword [ebp - 8], 1
xor esi, esi
lea ecx, [ebp - 0x5c]
mov edx, 0x4038f0
mov dword [ebp - 0x38], esi
call fcn.0041064c
test eax, eax
je 0x40e1a0
inc esi
mov dword [ebp - 0x38], esi
mov edx, 0x403900
lea ecx, [ebp - 0x5c]
call fcn.00410486
mov ebx, eax
mov dword [ebp - 0x10], ebx
test ebx, ebx
je 0x40ea02
mov edx, 0x403940
lea ecx, [ebp - 0x5c]
call fcn.00410486
mov dword [ebp - 0x24], eax
test eax, eax
je 0x40ea02
lea ecx, [ebp - 0x5c]
call fcn.0040fa41
test byte [ebp - 0xc], 0x20
je 0x40e1f9
xor ebx, ebx
inc ebx
push 0x403978
push 3
mov dword [ebp - 0x14], ebx
call fcn.0040fadc
pop ecx
pop ecx
jmp 0x40e291
xor edx, edx
mov ecx, ebx
cmp dword [ebp - 8], edi
je 0x40e261
inc edx
call fcn.00410ad0
test eax, eax
jne 0x40e229
mov eax, 0xc1
push eax
push ebx
mov edi, eax
push 0x4039d8
push 4
call fcn.0040fadc
add esp, 0x10
jmp 0x40ea0a
mov edx, 0x403a60
lea ecx, [ebp - 0x5c]
call fcn.00410486
mov ebx, eax
mov dword [ebp - 0x28], ebx
test ebx, ebx
je 0x40ea02
xor edx, edx
mov ecx, ebx
inc edx
call fcn.00410ad0
test eax, eax
je 0x40e278
mov ecx, dword [ebp - 0x10]
mov edx, ebx
push 0
call fcn.0040f18f
mov ebx, eax
jmp 0x40e27b
call fcn.00410ad0
test eax, eax
je 0x40e20c
mov ecx, dword [ebp - 0x24]
xor edx, edx
call fcn.00410ad0
test eax, eax
jne 0x40e280
xor ebx, ebx
inc ebx
mov dword [ebp - 0x14], ebx
jmp 0x40e291
mov edx, dword [ebp - 0x24]
mov ecx, ebx
push 0
call fcn.0040f18f
mov ebx, eax
mov dword [ebp - 0x14], eax
mov edx, 0x403a90
lea ecx, [ebp - 0x5c]
call fcn.00410486
mov dword [ebp - 4], eax
test eax, eax
je 0x40ea02
mov edx, 0x403ac0
lea ecx, [ebp - 0x5c]
call fcn.00410486
mov ecx, eax
mov dword [ebp - 0x20], ecx
test ecx, ecx
je 0x40ea02
mov eax, 0x403ae4
test ebx, ebx
jne 0x40e2d1
mov eax, 0x403aec
push ecx
push dword [ebp - 4]
push eax
push 0x403af8
push 2
call fcn.0040fadc
mov edx, dword [ebp - 0x20]
add esp, 0x14
mov ecx, dword [ebp - 4]
push 1
push 0
push dword [ebp - 0x18]
push esi
push esi
push ebx
push 0
call fcn.0040eb94
test eax, eax
jne 0x40e323
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push edi
push dword [ebp - 0x20]
push dword [ebp - 4]
push 0x403b60
push 4
call fcn.0040fadc
add esp, 0x14
jmp 0x40ea0a
cmp dword [ebp - 8], edi
jne 0x40e4ed
mov edx, 0x403be0
lea ecx, [ebp - 0x5c]
call fcn.00410486
mov ecx, dword [ebp - 0x10]
lea edx, [ebp - 0x5c]
mov esi, eax
mov dword [ebp - 0x30], esi
call fcn.0040f519
mov edx, 0x403c10
lea ecx, [ebp - 0x5c]
call fcn.00410486
mov ebx, eax
test esi, esi
je 0x40e3cd
test ebx, ebx
je 0x40e3cd
mov ecx, ebx
call fcn.0040f5ac
mov ecx, ebx
mov esi, eax
call fcn.004108b0
mov ecx, dword [ebp - 0x10]
mov edx, ebx
push 1
mov dword [ebp - 0x48], eax
call fcn.0040f18f
test esi, esi
je 0x40e38d
cmp dword [ebp - 0x48], 1
jne 0x40e3db
test eax, eax
je 0x40e3db
mov ecx, dword [ebp - 0x30]
call fcn.00411c75
test eax, eax
jne 0x40e3b1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x403cc0
push 3
call fcn.0040fadc
add esp, 0xc
jmp 0x40e3db
mov ecx, dword [ebp - 0x10]
mov edx, ebx
call fcn.0040f00a
test eax, eax
jne 0x40e3db
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x403d48
jmp 0x40e3a5
push 0x403c58
push 3
call fcn.0040fadc
pop ecx
pop ecx
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x40e3f2
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
test ebx, ebx
je 0x40e406
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push 0x403ddc
push 2
call fcn.0040fadc
pop ecx
pop ecx
mov edx, 0x403e20
lea ecx, [ebp - 0x5c]
call fcn.00410486
mov esi, eax
test esi, esi
je 0x40e44a
mov ecx, esi
call fcn.00411c75
test eax, eax
jne 0x40e458
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x403e68
push 3
call fcn.0040fadc
add esp, 0xc
jmp 0x40e458
push 0x403ed8
push 3
call fcn.0040fadc
pop ecx
pop ecx
test esi, esi
je 0x40e46c
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov ebx, dword [ebp - 4]
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
neg eax
lea ecx, [ebp - 0x5c]
mov edx, 0x4040d0
sbb eax, eax
not eax
and eax, ebx
mov dword [ebp - 4], eax
call fcn.00410486
test byte [ebp - 0xc], 0x80
mov esi, eax
push 0
pop ebx
setne bl
mov dword [ebp - 0x30], esi
xor eax, eax
inc ebx
push eax
push 6
push ebx
push eax
push eax
push 0xc0000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x48], eax
cmp eax, 0xffffffff
jne 0x40e5ee
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x50
jne 0x40e4db
cmp ebx, 2
jne 0x40e6bc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push 0x404110
jmp 0x40e6b2
cmp dword [ebp - 0x18], edi
jne 0x40e46c
test esi, esi
je 0x40e53a
mov eax, dword [ebp - 0x28]
test eax, eax
jne 0x40e519
mov edx, 0x403a60
lea ecx, [ebp - 0x5c]
call fcn.00410486
mov dword [ebp - 0x28], eax
test eax, eax
je 0x40ea02
push 0x403f30
xor edx, edx
mov ecx, eax
call fcn.0040fde5
test eax, eax
jne 0x40e53a
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x40ea02
test ebx, ebx
mov ebx, dword [ebp - 0x28]
je 0x40e553
mov ecx, dword [ebp - 0x10]
mov edx, ebx
call fcn.0040f00a
test eax, eax
je 0x40ea02
mov ecx, ebx
call fcn.00411920
test eax, eax
jne 0x40e57b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov ecx, ebx
mov edx, edi
call fcn.0040da6c
push edi
push ebx
push 0x403ff0
jmp 0x40e21a
push 7
pop edx
mov ecx, ebx
call fcn.0040f6f1
test eax, eax
je 0x40ea02
test esi, esi
je 0x40e5bf
xor edx, edx
mov esi, 0x403f30
push esi
inc edx
mov ecx, ebx
call fcn.0040fde5
test eax, eax
je 0x40ea02
mov ebx, dword [ebp - 0x24]
xor edx, edx
push esi
mov ecx, ebx
call fcn.0040fde5
test eax, eax
jne 0x40e5c2
jmp 0x40ea02
mov ebx, dword [ebp - 0x24]
mov ecx, ebx
call fcn.00411562
test eax, eax
jne 0x40e46c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov ecx, ebx
mov edx, edi
call fcn.0040da6c
push edi
push ebx
push 0x404060
jmp 0x40e21a
mov ebx, 0x10000
push ebx
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
test esi, esi
jne 0x40e621
mov esi, dword [ebp - 0x30]
push esi
push 0x404188
push 3
call fcn.0040fadc
mov ebx, dword [ebp - 0x48]
add esp, 0xc
jmp 0x40e693
push ebx
push 0
push esi
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebp - 0x4c]
push 0
push eax
push ebx
mov ebx, dword [ebp - 0x48]
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x40e65f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov eax, dword [ebp - 0x30]
push eax
push 0x404110
push 3
call fcn.0040fadc
add esp, 0x10
jmp 0x40e680
mov eax, 0x10000
cmp dword [ebp - 0x4c], eax
je 0x40e680
push eax
push dword [ebp - 0x4c]
mov eax, dword [ebp - 0x30]
push eax
push 0x404210
push 3
call fcn.0040fadc
add esp, 0x14
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov esi, dword [ebp - 0x30]
push ebx
call dword [sym.imp.ntdll.dll_NtClose]
mov ecx, esi
call fcn.00411920
test eax, eax
jne 0x40e6bc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push 0x4042a8
push 3
call fcn.0040fadc
add esp, 0x10
cmp dword [ebp - 8], edi
je 0x40e763
cmp dword [ebp - 0x18], edi
jne 0x40e744
mov edx, 0x404330
lea ecx, [ebp - 0x5c]
call fcn.00410486
mov edx, 0x404360
mov dword [ebp - 0x3c], eax
lea ecx, [ebp - 0x5c]
call fcn.00410486
mov ecx, dword [ebp - 0x3c]
mov ebx, eax
push 6
pop edx
mov dword [ebp - 0x54], ebx
call fcn.0040f6f1
test eax, eax
jne 0x40e70a
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x40ea02
push 6
pop edx
mov ecx, ebx
call fcn.0040f6f1
test eax, eax
jne 0x40e727
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x40ea02
push 6
pop edx
mov ecx, esi
call fcn.0040f6f1
test eax, eax
jne 0x40e744
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x40ea02
mov ebx, dword [ebp - 0x38]
test ebx, ebx
je 0x40e766
mov ecx, dword [ebp - 0x20]
xor edx, edx
push 0x404398
call fcn.0040fde5
test eax, eax
jne 0x40e766
jmp 0x40ea02
mov ebx, dword [ebp - 0x38]
mov eax, dword [ebp - 0xc]
test al, 8
je 0x40e7e7
mov edx, 0x4044b0
lea ecx, [ebp - 0x5c]
call fcn.00410486
mov esi, eax
mov dword [ebp - 4], esi
test esi, esi
je 0x40ea02
mov edx, 0x4044e0
lea ecx, [ebp - 0x5c]
call fcn.00410486
mov dword [ebp - 0x1c], eax
test eax, eax
je 0x40ea02
push eax
push esi
push 0x404518
push 2
call fcn.0040fadc
mov esi, dword [ebp - 0x14]
add esp, 0x10
mov edx, dword [ebp - 0x1c]
mov ecx, dword [ebp - 4]
push 1
push 0
push dword [ebp - 0x18]
push ebx
push ebx
push esi
push 0
call fcn.0040eb94
test eax, eax
jne 0x40e7ec
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push edi
push dword [ebp - 0x1c]
push dword [ebp - 4]
push 0x404560
jmp 0x40e314
mov esi, dword [ebp - 0x14]
jmp 0x40e7ef
mov eax, dword [ebp - 0xc]
test al, 4
je 0x40e86b
mov edx, 0x4045d0
lea ecx, [ebp - 0x5c]
call fcn.00410486
mov dword [ebp - 4], eax
test eax, eax
je 0x40ea02
mov edx, 0x404600
lea ecx, [ebp - 0x5c]
call fcn.00410486
mov dword [ebp - 0x1c], eax
test eax, eax
je 0x40ea02
push eax
push dword [ebp - 4]
push 0x404640
push 2
call fcn.0040fadc
mov edx, dword [ebp - 0x1c]
add esp, 0x10
push 1
push 0
push dword [ebp - 0x18]
push ebx
push ebx
push esi
mov esi, dword [ebp - 4]
mov ecx, esi
push 0
call fcn.0040eb94
test eax, eax
jne 0x40e86b
push esi
push 0x404690
push 3
call fcn.0040fadc
add esp, 0xc
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp - 8]
test eax, eax
je 0x40e9ea
mov esi, dword [ebp - 0x20]
mov ecx, esi
push 6
pop edx
call fcn.0040f6f1
test eax, eax
je 0x40ea02
test ebx, ebx
je 0x40e8a6
xor edx, edx
mov ecx, esi
push 0x404398
inc edx
call fcn.0040fde5
test eax, eax
je 0x40ea02
mov esi, 0x4047e0
lea ecx, [ebp - 0x5c]
mov edx, esi
call fcn.00410486
mov dword [ebp - 0x2c], eax
test eax, eax
jne 0x40e8d0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push edi
push esi
push 0x404818
jmp 0x40e21a
mov ecx, eax
call fcn.0040f5ac
test eax, eax
je 0x40e9e7
mov edx, 0x404870
lea ecx, [ebp - 0x5c]
call fcn.00410486
mov esi, eax
mov dword [ebp - 0x50], esi
test esi, esi
jne 0x40e905
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push edi
push 0x404870
jmp 0x40e8c6
mov edx, 0x4048a0
lea ecx, [ebp - 0x5c]
call fcn.00410486
mov dword [ebp - 0x34], eax
test eax, eax
jne 0x40e929
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push edi
push 0x4048a0
jmp 0x40e8c6
mov ecx, eax
call fcn.0040f5ac
test eax, eax
je 0x40e956
mov ecx, dword [ebp - 0x34]
call fcn.00411562
test eax, eax
jne 0x40e956
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push edi
push dword [ebp - 0x34]
push 0x4048c8
jmp 0x40e21a
mov ecx, dword [ebp - 0x2c]
mov edx, esi
call fcn.0040f00a
test eax, eax
jne 0x40e97b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push edi
push esi
push dword [ebp - 0x2c]
push 0x404928
jmp 0x40e314
mov ecx, dword [ebp - 0x2c]
call fcn.00411562
test eax, eax
jne 0x40e99d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push edi
push dword [ebp - 0x2c]
push 0x404980
jmp 0x40e21a
push 6
pop edx
mov ecx, esi
call fcn.0040f6f1
test eax, eax
jne 0x40e9bf
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push edi
push esi
push 0x404a08
jmp 0x40e21a
test ebx, ebx
je 0x40e9e7
mov edx, 0x404a70
mov ecx, esi
call fcn.00410033
test eax, eax
jne 0x40e9e7
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push edi
push esi
push 0x404ae8
jmp 0x40e21a
mov eax, dword [ebp - 8]
test dword [ebp - 0xc], 0x100
je 0x40ea0a
push eax
mov edx, ebx
lea ecx, [ebp - 0x5c]
call fcn.0040f7ba
test eax, eax
jne 0x40ea0a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
lea ecx, [ebp - 0x5c]
call fcn.0041044c
xor ebx, ebx
cmp dword [0x420390], ebx
je 0x40ea32
mov dword [0x420390], ebx
mov dword [0x4203e4], 5
mov dword [0x420394], ebx
mov eax, dword [ebp - 0x40]
test eax, eax
je 0x40ea42
xor edx, edx
mov ecx, eax
call fcn.0040fbba
mov eax, dword [ebp - 4]
test eax, eax
je 0x40ea58
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x40ea6e
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x40ea84
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x40ea9a
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x40eab0
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x40eac6
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [ebp - 0x50]
test eax, eax
je 0x40eadc
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x40eaf2
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x40eb08
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [ebp - 0x3c]
test eax, eax
je 0x40eb1e
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [ebp - 0x54]
test eax, eax
je 0x40eb34
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x40eb4a
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [ebp - 0x40]
test eax, eax
je 0x40eb60
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [ebp - 0x44]
test eax, eax
je 0x40eb76
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
test edi, edi
je 0x40eb85
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x40eb88
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret