Function at 0x40274d
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x26c
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x268], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov edi, ecx
movzx eax, byte [ebx]
dec eax
cmp eax, 0xd
ja case.0x4022cf.5
jmp dword [eax*4 + 0x4027f8]
push 0x2800
push 0x40
mov dword [edi + 0x30], 0
mov dword [esp + 0x1c], 0x2800
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
mov dword [esp + 0x18], esi
test esi, esi
je case.0x4022cf.5
lea ecx, [ebx + 1]
push ecx
lea eax, [esp + 0x16c]
push str._s.
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [esp + 0x28]
push eax
lea eax, [esp + 0x16c]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov dword [esp + 0x10], eax
cmp eax, 0xffffffff
jne 0x402361
mov ecx, dword [edi + 8]
lea eax, [esp + 0xc]
push 1
push eax
mov byte [esp + 0x14], 0x2e
call fcn.00401f40
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x268]
xor ecx, esp
call fcn.0040506d
mov esp, ebp
pop ebp
ret 8
mov byte [esi], 0x2e
mov ebx, 1
nop dword [eax]
mov ecx, dword [esp + 0x14]
lea eax, [ecx - 0x208]
cmp ebx, eax
jbe 0x4023a0
add ecx, 0x208
push 0x42
push ecx
push esi
mov dword [esp + 0x20], ecx
call dword [sym.imp.KERNEL32.dll_LocalReAlloc]
mov esi, eax
mov dword [esp + 0x18], esi
test esi, esi
je case.0x4022cf.5
push 0x41c9dc
lea eax, [esp + 0x58]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
je 0x402421
push 0x41c9e0
lea eax, [esp + 0x58]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
je 0x402421
mov al, byte [esp + 0x28]
and al, 0x10
mov byte [ebx + esi], al
lea eax, [esp + 0x54]
push eax
inc ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, dword [esp + 0x18]
mov esi, eax
push esi
lea eax, [esp + 0x58]
add ecx, ebx
push eax
push ecx
call fcn.00407d00
add ebx, esi
add esp, 0xc
mov esi, dword [esp + 0x18]
mov byte [ebx + esi], 0
mov eax, dword [esp + 0x44]
mov dword [ebx + esi + 1], eax
mov eax, dword [esp + 0x48]
mov dword [ebx + esi + 5], eax
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x40]
mov dword [ebx + esi + 9], eax
mov dword [ebx + esi + 0xd], ecx
add ebx, 0x11
lea eax, [esp + 0x28]
push eax
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x402370
mov ecx, dword [edi + 8]
push ebx
push esi
call fcn.00401f40
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_FindClose]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x268]
xor ecx, esp
call fcn.0040506d
mov esp, ebp
pop ebp
ret 8
lea eax, [ebx + 1]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov byte [esp + 0xc], 0x32
push 1
lea eax, [esp + 0x10]
mov ecx, dword [edi + 8]
push eax
call fcn.00401f40
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x268]
xor ecx, esp
call fcn.0040506d
mov esp, ebp
pop ebp
ret 8
lea eax, [ebx + 1]
push eax
call fcn.00402b70
jmp 0x402474
inc ebx
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp byte [eax + ebx - 1], 0x5c
jne 0x4024d0
push ebx
mov ecx, edi
call fcn.00402dd0
mov eax, dword [edi + 0x10]
cmp eax, dword [edi + 0xc]
jne 0x4024e1
mov byte [esp + 0xc], 0x31
jmp 0x402479
lea eax, [esp + 0x10]
mov dword [esp + 0x10], ebx
push eax
lea ecx, [edi + 0xc]
call fcn.00403080
mov eax, dword [edi + 0x10]
mov ecx, edi
push dword [eax - 4]
call fcn.00402c70
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x268]
xor ecx, esp
call fcn.0040506d
mov esp, ebp
pop ebp
ret 8
inc ebx
cmp dword [ebx + 4], 0xffffffff
jne 0x402528
call fcn.00402d60
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x268]
xor ecx, esp
call fcn.0040506d
mov esp, ebp
pop ebp
ret 8
push 0
push 0x80
push 3
push 0
push 1
push closesocket
lea eax, [edi + 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [esp + 0x14], eax
cmp eax, 0xffffffff
je case.0x4022cf.5
push 0
push ebx
push dword [ebx + 4]
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0xc800
push 0x40
mov dword [esp + 0x18], 0
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
test esi, esi
je case.0x4022cf.5
push 0
lea eax, [esp + 0x14]
mov byte [esi], 0x30
mov ecx, dword [ebx]
mov edx, dword [ebx + 4]
mov ebx, dword [esp + 0x18]
push eax
push 0xc7f7
lea eax, [esi + 9]
mov dword [esi + 1], ecx
push eax
push ebx
mov dword [esi + 5], edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4025e0
mov ecx, dword [edi + 8]
add eax, 9
push eax
push esi
call fcn.00401f40
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x268]
xor ecx, esp
call fcn.0040506d
mov esp, ebp
pop ebp
ret 8
mov ecx, edi
call fcn.00402d60
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x268]
xor ecx, esp
call fcn.0040506d
mov esp, ebp
pop ebp
ret 8
push 0
lea eax, [ebx + 1]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov byte [esp + 0xc], 0x35
jmp 0x402479
lea esi, [ebx + 1]
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
inc eax
add eax, esi
push eax
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileA]
mov byte [esp + 0xc], 0x37
jmp 0x402479
mov eax, dword [edi + 0x10]
cmp eax, dword [edi + 0xc]
je 0x402670
lea esi, [edi + 0x18]
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [edi + 0xc]
mov eax, dword [edi + 0x10]
sub eax, ecx
and eax, 0xfffffffc
push eax
push 0
push ecx
call fcn.00406600
mov eax, dword [edi + 0xc]
add esp, 0xc
mov dword [edi + 0x10], eax
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov byte [esp + 0xc], 0x31
jmp 0x402479
mov eax, dword [ebx + 1]
mov dword [edi + 0x30], eax
call fcn.00402f50
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x268]
xor ecx, esp
call fcn.0040506d
mov esp, ebp
pop ebp
ret 8
push 0x104
lea esi, [edi + 0x34]
push 0
push esi
call fcn.00406600
add esp, 0xc
lea eax, [ebx + 9]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov ecx, dword [ebx + 1]
xor eax, eax
add eax, dword [ebx + 5]
mov dword [edi + 0x138], eax
lea eax, [esp + 0x28]
push eax
adc ecx, 0
push esi
mov dword [edi + 0x13c], ecx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x402728
mov ecx, dword [edi + 0x30]
cmp ecx, 4
je 0x402728
cmp ecx, 2
je 0x402728
cmp ecx, 6
je 0x402728
mov ecx, dword [edi + 8]
lea eax, [esp + 0xc]
push 1
push eax
mov byte [esp + 0x14], 0x33
call fcn.00401f40
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x268]
xor ecx, esp
call fcn.0040506d
mov esp, ebp
pop ebp
ret 8
mov ecx, edi
call fcn.00402f50
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x268]
xor ecx, esp
call fcn.0040506d
mov esp, ebp
pop ebp
ret 8
mov eax, dword [ebx + 1]
push 0
push 0x80
push 3
push 0
mov dword [esp + 0x20], eax
mov eax, dword [ebx + 5]
push 2
mov dword [esp + 0x28], eax
lea eax, [edi + 0x34]
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je case.0x4022cf.5
push 0
lea eax, [esp + 0x14]
push eax
push dword [esp + 0x1c]
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [esp + 0x1c]
push eax
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff7
push eax
lea eax, [ebx + 9]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x10]
mov dword [esp + 0x1d], eax
mov eax, dword [esp + 0x18]
add eax, dword [esp + 0x14]
mov dword [esp + 0x21], eax
lea eax, [esp + 0x1c]
mov byte [esp + 0x1c], 0x36
push 9
jmp 0x40247f
push ecx
lea eax, [ebx + 1]
push eax
call fcn.00402830
mov ecx, dword [esp + 0x274]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0040506d
mov esp, ebp
pop ebp
ret 8