Function at 0x40f2d0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x364
mov eax, dword [0x4677a0]
xor eax, esp
mov dword [esp + 0x360], eax
mov eax, dword [esp + 0x36c]
push ebx
push ebp
mov ebp, dword [esp + 0x370]
movzx ecx, byte [ebp + 4]
mov dl, byte [ebp + 4]
push esi
lea esi, [ebp + 4]
lea ebx, [ecx + ebp + 5]
push edi
xor edi, edi
mov dword [esp + 0x10], eax
mov eax, dword [eax + 4]
mov dword [esp + 0x14], 0
mov cl, byte [ebx]
mov word [esp + 0x18], di
mov word [esp + 0x118], di
mov eax, dword [eax + 8]
cmp eax, 1
jne 0x40f71b
movzx eax, cl
mov edi, 0x80
lea ecx, [esp + 0x18]
lea esp, [esp]
cmp word [ecx], 0
je 0x40f350
add ecx, 2
sub edi, 1
jne 0x40f340
jmp 0x40f374
test edi, edi
je 0x40f374
mov edx, 0x80
sub edx, edi
cmp eax, 0x7ffffffe
ja 0x40f374
inc ebx
mov ecx, 0x80
sub ecx, edx
push ebx
lea edx, [esp + edx*2 + 0x1c]
call fcn.0040ff40
cmp word [esp + 0x18], 0
lea edx, [esp + 0x18]
lea eax, [esp + 0x118]
mov edi, 0xa
je 0x40f403
lea esp, [esp]
movzx ecx, word [edx]
cmp cx, 0xd
jne 0x40f3ba
mov ecx, 0x5c
mov word [eax], cx
add eax, 2
mov ecx, 0x72
mov word [eax], cx
add eax, 2
cmp word [edx + 2], di
jne 0x40f3fa
add edx, 2
jmp 0x40f3fa
cmp cx, di
jne 0x40f3ce
mov ecx, 0x5c
mov word [eax], cx
mov ecx, 0x72
jmp 0x40f3f1
cmp cx, 9
jne 0x40f3e3
mov ecx, 0x5c
mov word [eax], cx
mov ecx, 0x74
jmp 0x40f3f1
cmp cx, 0x5c
jne 0x40f3f4
mov ecx, 0x5c
mov word [eax], cx
add eax, 2
mov word [eax], cx
add eax, 2
add edx, 2
cmp word [edx], 0
jne 0x40f390
xor edx, edx
mov word [eax], dx
mov ecx, 0x12c
lea eax, [esp + 0x118]
cmp word [eax], 0
je 0x40f424
add eax, 2
sub ecx, 1
jne 0x40f414
jmp 0x40f447
test ecx, ecx
je 0x40f447
mov eax, 0x12c
sub eax, ecx
mov ecx, 0x12c
sub ecx, eax
lea edx, [esp + eax*2 + 0x118]
mov eax, 0x45cfd0
call fcn.00407450
mov edi, dword [esp + 0x10]
mov eax, dword [edi + 8]
test eax, eax
je 0x40f467
mov edx, dword [eax + 8]
push 0x81
lea ecx, [esp + 0x1c]
push ecx
push esi
call edx
add esp, 0xc
jmp 0x40f470
lea edx, [esp + 0x18]
call fcn.0040f280
mov ecx, 0x12c
lea eax, [esp + 0x118]
lea esp, [esp]
cmp word [eax], 0
je 0x40f490
add eax, 2
sub ecx, 1
jne 0x40f480
jmp 0x40f4b2
test ecx, ecx
je 0x40f4b2
mov eax, 0x12c
sub eax, ecx
mov ecx, 0x12c
sub ecx, eax
lea edx, [esp + eax*2 + 0x118]
lea eax, [esp + 0x18]
call fcn.00407450
test dword [ebp], 0x80000000
je 0x40f4fa
mov ecx, 0x12c
lea eax, [esp + 0x118]
cmp word [eax], 0
je 0x40f4d7
add eax, 2
sub ecx, 1
jne 0x40f4c7
jmp 0x40f4fa
test ecx, ecx
je 0x40f4fa
mov eax, 0x12c
sub eax, ecx
mov ecx, 0x12c
sub ecx, eax
lea edx, [esp + eax*2 + 0x118]
mov eax, 0x45cfd4
call fcn.00407450
cmp dword [edi + 0xc], 0x64
je 0x40f548
test dword [ebp], 0x40000000
je 0x40f548
mov ecx, 0x12c
lea eax, [esp + 0x118]
cmp word [eax], 0
je 0x40f525
add eax, 2
sub ecx, 1
jne 0x40f515
jmp 0x40f548
test ecx, ecx
je 0x40f548
mov eax, 0x12c
sub eax, ecx
mov ecx, 0x12c
sub ecx, eax
lea edx, [esp + eax*2 + 0x118]
mov eax, 0x45cfc8
call fcn.00407450
cmp dword [edi + 0xc], 1
jge 0x40f6a3
movzx eax, byte [ebp + 3]
and eax, 0x3f
cmp eax, 2
jne 0x40f5aa
mov ecx, 0x12c
lea eax, [esp + 0x118]
lea ebx, [ebx]
cmp word [eax], 0
je 0x40f583
add eax, 2
sub ecx, 1
jne 0x40f570
jmp 0x40f6a3
test ecx, ecx
je 0x40f6a3
mov eax, 0x12c
sub eax, ecx
mov ecx, 0x12c
sub ecx, eax
lea edx, [esp + eax*2 + 0x118]
mov eax, 0x45cfb0
jmp 0x40f69e
cmp eax, 3
jne 0x40f5fa
mov ecx, 0x12c
lea eax, [esp + 0x118]
jmp 0x40f5c0
cmp word [eax], 0
je 0x40f5d3
add eax, 2
sub ecx, 1
jne 0x40f5c0
jmp 0x40f6a3
test ecx, ecx
je 0x40f6a3
mov eax, 0x12c
sub eax, ecx
mov ecx, 0x12c
sub ecx, eax
lea edx, [esp + eax*2 + 0x118]
mov eax, 0x45cfb8
jmp 0x40f69e
cmp eax, 4
jne 0x40f643
mov ecx, 0x12c
lea eax, [esp + 0x118]
jmp 0x40f610
cmp word [eax], 0
je 0x40f623
add eax, 2
sub ecx, 1
jne 0x40f610
jmp 0x40f6a3
test ecx, ecx
je 0x40f6a3
mov eax, 0x12c
sub eax, ecx
mov ecx, 0x12c
sub ecx, eax
lea edx, [esp + eax*2 + 0x118]
mov eax, 0x45cfc0
jmp 0x40f69e
lea ecx, [eax - 0x10]
cmp ecx, 0xf
ja 0x40f6a3
add eax, 0xfffffff1
push eax
push 0x45cfe0
mov ecx, 0xa
lea ebx, [esp + 0x20]
call fcn.00402d10
add esp, 8
mov ecx, 0x12c
lea eax, [esp + 0x118]
cmp word [eax], 0
je 0x40f681
add eax, 2
sub ecx, 1
jne 0x40f671
jmp 0x40f6a3
test ecx, ecx
je 0x40f6a3
mov eax, 0x12c
sub eax, ecx
mov ecx, 0x12c
sub ecx, eax
lea edx, [esp + eax*2 + 0x118]
lea eax, [esp + 0x18]
call fcn.00407450
mov eax, dword [ebp]
and eax, 0xffff
jbe 0x40f779
cmp dword [edi + 0xc], 0
jl 0x40f779
push eax
push 0x45cfec
mov ecx, 0xa
lea ebx, [esp + 0x20]
call fcn.00402d10
add esp, 8
mov ecx, 0x12c
lea eax, [esp + 0x118]
mov edi, edi
cmp word [eax], 0
je 0x40f6f3
add eax, 2
sub ecx, 1
jne 0x40f6e0
jmp 0x40f779
test ecx, ecx
je 0x40f779
mov eax, 0x12c
sub eax, ecx
mov ecx, 0x12c
sub ecx, eax
lea edx, [esp + eax*2 + 0x118]
lea eax, [esp + 0x18]
call fcn.00407450
jmp 0x40f779
cmp eax, 5
jne 0x40f817
movzx eax, dl
mov edi, 0x12c
lea ecx, [esp + 0x118]
cmp word [ecx], 0
je 0x40f746
add ecx, 2
sub edi, 1
jne 0x40f733
jmp 0x40f817
test edi, edi
je 0x40f817
mov edx, 0x12c
sub edx, edi
cmp eax, 0x7ffffffe
ja 0x40f817
inc esi
mov ecx, 0x12c
sub ecx, edx
push esi
lea edx, [esp + edx*2 + 0x11c]
call fcn.0040ff40
mov edi, dword [esp + 0x10]
cmp word [esp + 0x118], 0
je 0x40f817
mov ecx, 0x100
lea eax, [esp + 0x118]
cmp word [eax], 0
je 0x40f7a4
add eax, 2
sub ecx, 1
jne 0x40f794
jmp 0x40f7c7
test ecx, ecx
je 0x40f7c7
mov eax, 0x100
sub eax, ecx
mov ecx, 0x100
sub ecx, eax
lea edx, [esp + eax*2 + 0x118]
mov eax, 0x456884
call fcn.00407450
lea eax, [esp + 0x118]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40f7d1
sub eax, edx
push 0
sar eax, 1
lea edx, [esp + 0x18]
push edx
mov edx, dword [edi]
add eax, eax
push eax
lea ecx, [esp + 0x124]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [edi + 0x18]
test eax, eax
je 0x40f817
mov ecx, dword [edi + 0x10]
lea edx, [ecx + 1]
mov dword [edi + 0x10], edx
mov edx, dword [edi + 0x14]
push edx
push ecx
push 0
call eax
add esp, 0xc
mov ecx, dword [esp + 0x370]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
mov eax, 1
call fcn.00435010
add esp, 0x364
ret