Function at 0x402840
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41cdfb
mov eax, dword fs:[0]
push eax
sub esp, 0x2d8
mov eax, dword [0x425004]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov ecx, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
push ecx
mov ecx, esi
mov dword [ebp - 0x2d4], eax
call fcn.00402380
mov dword [ebp - 0x2b0], eax
mov dword [ebp - 0x2ac], 0
mov dword [ebp - 0x2e4], 0
mov dword [ebp - 0x2e0], 0
mov dword [ebp - 0x2dc], 0
lea edx, [ebp - 0x2a4]
mov dword [ebp - 4], 0
mov ecx, dword [eax]
push edx
push 0x1e
lea edx, [ebp - 0x288]
push edx
push dword [ebp + 0x10]
lea edx, [ebp - 0x2ac]
push edx
push eax
call dword [ecx + 0x58]
test eax, eax
jne 0x402ba1
mov eax, dword [ebp - 0x2a4]
lea ecx, [ebp - 0x2a0]
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
xor ebx, ebx
mov dword [ebp - 0x2a0], eax
mov dword [ebp - 0x28c], ecx
push 0
lea eax, [ebp - 0x294]
push eax
push 4
push ecx
push dword [esi + 0x18]
call edi
test eax, eax
je 0x402c2d
mov ecx, dword [ebp - 0x28c]
add ebx, dword [ebp - 0x294]
add ecx, dword [ebp - 0x294]
mov dword [ebp - 0x28c], ecx
cmp ebx, 4
jb 0x402901
xor ecx, ecx
mov dword [ebp - 0x2a0], ecx
cmp dword [ebp - 0x2a4], ecx
jbe 0x402bdd
nop dword [eax + eax]
mov edx, dword [ebp - 0x2b0]
lea ebx, [ebp - 0x2c8]
push ebx
lea ebx, [ebp - 0x2cc]
push ebx
mov eax, dword [edx]
lea ebx, [ebp - 0x2b8]
push ebx
lea ebx, [ebp - 0x2d0]
push ebx
lea ebx, [ebp - 0x29c]
push ebx
push 0xff
lea ebx, [ebp - 0x210]
push ebx
lea ebx, [ebp - 0x2c0]
push ebx
lea ebx, [ebp - 0x2d4]
push ebx
push dword [ebp + ecx*4 - 0x288]
push edx
call dword [eax + 0xec]
test eax, eax
jne 0x402a9b
mov eax, dword [ebp - 0x29c]
add eax, eax
push 0
mov dword [ebp - 0x29c], eax
lea eax, [ebp - 0x2b4]
push eax
push 4
lea eax, [ebp - 0x29c]
push eax
push dword [esi + 0x18]
call edi
mov eax, dword [ebp - 0x29c]
test eax, eax
je 0x4029f0
push 0
lea ecx, [ebp - 0x2b4]
push ecx
push eax
lea eax, [ebp - 0x210]
push eax
push dword [esi + 0x18]
call edi
mov eax, dword [ebp - 0x2b8]
lea ecx, [ebp - 0x294]
mov dword [ebp - 0x294], eax
xor ebx, ebx
mov dword [ebp - 0x28c], ecx
nop word [eax + eax]
push 0
lea eax, [ebp - 0x2bc]
push eax
push 4
push ecx
push dword [esi + 0x18]
call edi
test eax, eax
je 0x402c2d
mov ecx, dword [ebp - 0x28c]
add ebx, dword [ebp - 0x2bc]
add ecx, dword [ebp - 0x2bc]
mov dword [ebp - 0x28c], ecx
cmp ebx, 4
jb 0x402a10
mov eax, dword [ebp - 0x2c0]
lea ecx, [ebp - 0x294]
mov dword [ebp - 0x294], eax
xor ebx, ebx
mov dword [ebp - 0x28c], ecx
push 0
lea eax, [ebp - 0x2c4]
push eax
push 4
push ecx
push dword [esi + 0x18]
call edi
test eax, eax
je 0x402c2d
mov ecx, dword [ebp - 0x28c]
add ebx, dword [ebp - 0x2c4]
add ecx, dword [ebp - 0x2c4]
mov dword [ebp - 0x28c], ecx
cmp ebx, 4
jb 0x402a60
jmp 0x402b86
lea ecx, [ebp - 0x294]
mov dword [ebp - 0x294], 0
mov dword [ebp - 0x28c], ecx
xor ebx, ebx
push 0
lea eax, [ebp - 0x2a8]
push eax
push 4
push ecx
push dword [esi + 0x18]
call edi
test eax, eax
je 0x402c2d
mov ecx, dword [ebp - 0x28c]
add ebx, dword [ebp - 0x2a8]
add ecx, dword [ebp - 0x2a8]
mov dword [ebp - 0x28c], ecx
cmp ebx, 4
jb 0x402ab3
lea ecx, [ebp - 0x294]
mov dword [ebp - 0x294], 0
mov dword [ebp - 0x28c], ecx
xor ebx, ebx
push 0
lea eax, [ebp - 0x298]
push eax
push 4
push ecx
push dword [esi + 0x18]
call edi
test eax, eax
je 0x402c2d
mov ecx, dword [ebp - 0x28c]
add ebx, dword [ebp - 0x298]
add ecx, dword [ebp - 0x298]
mov dword [ebp - 0x28c], ecx
cmp ebx, 4
jb 0x402b01
lea ecx, [ebp - 0x294]
mov dword [ebp - 0x294], 0xffffffff
mov dword [ebp - 0x28c], ecx
xor ebx, ebx
nop
push 0
lea eax, [ebp - 0x290]
push eax
push 4
push ecx
push dword [esi + 0x18]
call edi
test eax, eax
je 0x402c48
mov ecx, dword [ebp - 0x28c]
add ebx, dword [ebp - 0x290]
add ecx, dword [ebp - 0x290]
mov dword [ebp - 0x28c], ecx
cmp ebx, 4
jb 0x402b50
mov ecx, dword [ebp - 0x2a0]
inc ecx
mov dword [ebp - 0x2a0], ecx
cmp ecx, dword [ebp - 0x2a4]
jb 0x402950
jmp 0x402bdd
mov dword [ebp - 0x290], 0
lea ebx, [ebp - 0x290]
xor edi, edi
push 0
lea eax, [ebp - 0x298]
push eax
push 4
push ebx
push dword [esi + 0x18]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x402c12
add edi, dword [ebp - 0x298]
add ebx, dword [ebp - 0x298]
cmp edi, 4
jb 0x402bb3
mov ecx, dword [ebp - 0x2ac]
test ecx, ecx
je 0x402bf4
mov edx, dword [ebp - 0x2b0]
push ecx
push edx
mov eax, dword [edx]
call dword [eax + 0xc]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00405531
mov esp, ebp
pop ebp
ret 0xc
push 0x424658
lea eax, [ebp - 0x2a8]
mov dword [ebp - 0x2a8], str.Write_Error
push eax
call fcn.004069d9
push 0x424658
lea eax, [ebp - 0x290]
mov dword [ebp - 0x290], str.Write_Error
push eax
call fcn.004069d9
push 0x424658
lea eax, [ebp - 0x298]
mov dword [ebp - 0x298], str.Write_Error
push eax
call fcn.004069d9
int3