Function at 0x40f140
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x108
mov ecx, dword [esp + 0x10c]
mov eax, dword [esp + 0x110]
push ebx
push ebp
mov edx, dword [ecx + 0x68]
mov ebp, dword [ecx + 0x6c]
push esi
mov esi, dword [eax + 0xc]
push edi
mov dword [esp + 0x14], edx
xor eax, eax
mov ebx, 0x100
mov byte [esp + eax + 0x18], al
inc eax
cmp eax, ebx
jl 0x40f16c
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
test ebp, ebp
je 0x40f292
cmp dword [ecx + 0x5c], 3
jne 0x40f211
xor ebx, ebx
test edx, edx
jle 0x40f2ef
mov ecx, dword [ebp + 8]
lea eax, [esp + 0x10]
push 0
push eax
mov dl, byte [ebx + ecx]
lea ecx, [esp + 0x20]
push 1
push ecx
push esi
mov byte [esp + 0x2c], dl
call edi
mov edx, dword [ebp + 4]
lea ecx, [esp + 0x10]
push 0
push ecx
mov al, byte [edx + ebx]
lea edx, [esp + 0x20]
push 1
push edx
push esi
mov byte [esp + 0x2c], al
call edi
mov eax, dword [ebp]
lea edx, [esp + 0x10]
push 0
push edx
mov cl, byte [eax + ebx]
lea eax, [esp + 0x20]
push 1
push eax
push esi
mov byte [esp + 0x2c], cl
call edi
cmp dword [esp + 0x128], 4
jne 0x40f203
lea ecx, [esp + 0x10]
push 0
push ecx
lea edx, [esp + 0x20]
push 1
push edx
push esi
call edi
mov eax, dword [esp + 0x14]
inc ebx
cmp ebx, eax
jl 0x40f197
jmp 0x40f2e8
xor ebx, ebx
test edx, edx
jle 0x40f2ef
mov eax, dword [ebp]
lea edx, [esp + 0x10]
push 0
push edx
mov cl, byte [eax + ebx]
lea eax, [esp + 0x20]
push 1
push eax
push esi
mov byte [esp + 0x2c], cl
call edi
mov ecx, dword [ebp]
lea eax, [esp + 0x10]
push 0
push eax
mov dl, byte [ecx + ebx]
lea ecx, [esp + 0x20]
push 1
push ecx
push esi
mov byte [esp + 0x2c], dl
call edi
mov edx, dword [ebp]
lea ecx, [esp + 0x10]
push 0
push ecx
mov al, byte [edx + ebx]
lea edx, [esp + 0x20]
push 1
push edx
push esi
mov byte [esp + 0x2c], al
call edi
cmp dword [esp + 0x128], 4
jne 0x40f287
lea eax, [esp + 0x10]
push 0
push eax
lea ecx, [esp + 0x20]
push 1
push ecx
push esi
call edi
mov eax, dword [esp + 0x14]
inc ebx
cmp ebx, eax
jl 0x40f21b
jmp 0x40f2e8
lea ebp, [esp + 0x18]
mov dword [esp + 0x14], ebx
lea edx, [esp + 0x10]
push 0
push edx
push 1
push ebp
push esi
call edi
lea eax, [esp + 0x10]
push 0
push eax
push 1
push ebp
push esi
call edi
lea ecx, [esp + 0x10]
push 0
push ecx
push 1
push ebp
push esi
call edi
cmp dword [esp + 0x128], 4
jne 0x40f2dc
lea edx, [esp + 0x10]
push 0
push edx
lea eax, [esp + 0x20]
push 1
push eax
push esi
call edi
mov eax, dword [esp + 0x14]
inc ebp
dec eax
mov dword [esp + 0x14], eax
jne 0x40f29a
mov ecx, dword [esp + 0x11c]
mov ebp, dword [esp + 0x124]
cmp ebx, ebp
jle 0x40f312
mov edx, dword [ecx]
push ecx
mov dword [edx + 0x14], 0x3f6
mov eax, dword [ecx]
mov dword [eax + 0x18], ebx
mov edx, dword [ecx]
call dword [edx]
add esp, 4
cmp ebx, ebp
jge 0x40f367
sub ebp, ebx
lea eax, [esp + 0x10]
push 0
push eax
lea ecx, [esp + 0x20]
push 1
push ecx
push esi
call edi
lea edx, [esp + 0x10]
push 0
push edx
lea eax, [esp + 0x20]
push 1
push eax
push esi
call edi
lea ecx, [esp + 0x10]
push 0
push ecx
lea edx, [esp + 0x20]
push 1
push edx
push esi
call edi
cmp dword [esp + 0x128], 4
jne 0x40f364
lea eax, [esp + 0x10]
push 0
push eax
lea ecx, [esp + 0x20]
push 1
push ecx
push esi
call edi
dec ebp
jne 0x40f316
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x108
ret