Function at 0x409250
Capabilities:
Delete file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x429395
mov eax, dword fs:[0]
push eax
sub esp, 0x18
push ebx
push esi
push edi
mov eax, dword [0x438040]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x18], ecx
mov ebx, dword [ebp + 0xc]
mov ebx, dword [ebx]
call fcn.0040db30
mov ecx, eax
test ecx, ecx
je 0x409594
mov eax, dword [ecx]
call dword [eax + 0xc]
mov dword [ebp - 0x20], eax
lea esi, [eax + 0x10]
mov dword [ebp - 0x10], esi
mov dword [ebp - 4], 0
test ebx, ebx
je 0x409325
test ebx, 0xffff0000
jne 0x4092ca
movzx edi, bx
mov ecx, edi
call fcn.0040d010
test eax, eax
je 0x409330
push edi
push eax
lea ecx, [ebp - 0x10]
call fcn.0040d1a0
jmp 0x40932d
push 0
push 0
push 0xffffffffffffffff
push ebx
push 0
push 3
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea edi, [eax - 1]
test edi, edi
jle 0x409325
mov eax, dword [ebp - 0x20]
mov ecx, 1
sub ecx, dword [eax + 0xc]
mov eax, dword [eax + 8]
sub eax, edi
or eax, ecx
jge 0x409302
push edi
lea ecx, [ebp - 0x10]
call fcn.0040d840
mov esi, dword [ebp - 0x10]
push edi
push esi
push 0xffffffffffffffff
push ebx
push 0
push 3
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
cmp edi, dword [esi - 8]
jg 0x40959e
xor eax, eax
mov dword [esi - 0xc], edi
mov word [esi + edi*2], ax
jmp 0x409330
lea ecx, [ebp - 0x10]
call fcn.0040d8a0
mov esi, dword [ebp - 0x10]
lea eax, [ebp - 0x10]
mov dword [ebp - 4], 1
mov edx, dword [ebp + 8]
lea ecx, [ebp - 0x24]
push eax
call fcn.00409e80
push str..def
mov edx, eax
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x14]
call fcn.00409cf0
add esp, 8
mov byte [ebp - 4], 4
or ebx, 0xffffffff
mov edx, dword [ebp - 0x24]
mov eax, ebx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40937d
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 5
add esi, 0xfffffff0
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x409398
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
push str..lib
lea edx, [ebp - 0x14]
lea ecx, [ebp - 0x1c]
call fcn.00409cf0
add esp, 4
mov byte [ebp - 4], 6
mov eax, dword [ebp + 0xc]
push 0
push 0x80
push 2
mov edi, dword [eax + 4]
push 0
push 0
push 0x40000000
mov eax, dword [edi - 0xc]
mov dword [ebp + 0xc], eax
mov eax, dword [ebp - 0x14]
push eax
mov dword [ebp + 8], eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x409442
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
jg 0x4093f3
call esi
mov esi, eax
jmp 0x4093fe
call esi
movzx esi, ax
or esi, 0x80070000
push esi
push dword [ebp + 8]
push 0x431430
call fcn.0040cf10
add esp, 0xc
test esi, esi
je 0x40945a
jle 0x40941e
movzx esi, si
or esi, 0x80070000
mov edi, dword [ebp - 0x18]
mov eax, dword [edi]
mov dword [eax], esi
mov eax, dword [edi]
push dword [eax]
push dword [ebp - 0x14]
push 0x431b3c
call fcn.0040cf10
mov eax, dword [edi]
add esp, 0xc
mov esi, dword [eax]
jmp 0x409541
push 0
lea eax, [ebp + 0xc]
push eax
push dword [ebp + 0xc]
push edi
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.0040db30
mov ecx, eax
test ecx, ecx
je 0x4095a8
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp + 8], eax
mov byte [ebp - 4], 7
lea eax, [ebp + 8]
push dword [ebp - 0x1c]
push dword [ebp - 0x14]
push str.link__lib__DEF:__s___Out:__s_
push eax
call fcn.0040ce10
mov esi, dword [ebp + 8]
add esp, 0xc
mov edi, esp
mov byte [ebp + 0xf], 0
mov dword [ebp - 0x20], edi
lea eax, [esi - 0x10]
mov ecx, eax
mov dword [ebp - 0x20], eax
call fcn.0040ce30
mov dl, byte [ebp + 0xf]
add eax, 0x10
mov dword [edi], eax
call fcn.0040dcf0
mov ecx, eax
add esp, 4
test ecx, ecx
je 0x4094e8
jle 0x4094c9
movzx ecx, cx
or ecx, 0x80070000
mov edi, dword [ebp - 0x18]
mov eax, dword [edi]
mov dword [eax], ecx
mov eax, dword [edi]
push dword [eax]
push esi
push 0x431b3c
call fcn.0040cf10
mov eax, dword [edi]
add esp, 0xc
mov esi, dword [eax]
jmp 0x409526
push dword [ebp - 0x14]
mov esi, dword [sym.imp.KERNEL32.dll_DeleteFileW]
call esi
push str..exp
lea edx, [ebp - 0x14]
lea ecx, [ebp + 0xc]
call fcn.00409cf0
add esp, 4
push dword [eax]
call esi
mov edx, dword [ebp + 0xc]
mov eax, ebx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x409524
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
xor esi, esi
mov edx, dword [ebp - 0x20]
mov eax, ebx
mov byte [ebp - 4], 6
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x409541
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 5
mov eax, ebx
mov edx, dword [ebp - 0x1c]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40955f
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
lock xadd dword [eax + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x40957e
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
push 0x80004005
call fcn.0040d910
push 0x80070057
call fcn.0040d910
push 0x80004005
call fcn.0040d910
int3