Function at 0x41bd58
Capabilities:
Delete file
Get common file path
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov ecx, 4
push 0
push 0
dec ecx
jne 0x41bd60
push ecx
push ebx
mov ebx, eax
xor eax, eax
push ebp
push 0x41c005
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0xc]
xor ecx, ecx
mov edx, 4
call fcn.00403688
test bl, bl
je 0x41bfc5
xor ebx, ebx
mov eax, pe_nt_image_headers32
call fcn.00402e0c
mov dword [ebp - 0xc], eax
test bl, bl
jne 0x41bddf
mov eax, pe_nt_image_headers32
call fcn.00402e0c
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
push eax
push pe_nt_image_headers32
call sub.KERNEL32.DLL_GetTempPathA
test eax, eax
je 0x41bddf
test bl, bl
jne 0x41bddf
lea eax, [ebp - 0x18]
mov edx, dword [ebp - 0xc]
call fcn.00405038
mov eax, dword [ebp - 0x18]
call fcn.0041c574
cmp al, 1
jne 0x41bddf
mov bl, 1
test bl, bl
jne 0x41be1f
mov eax, pe_nt_image_headers32
call fcn.00402e0c
mov dword [ebp - 0xc], eax
push pe_nt_image_headers32
mov eax, dword [ebp - 0xc]
push eax
call sub.KERNEL32.DLL_GetWindowsDirectoryA
test eax, eax
je 0x41be1f
test bl, bl
jne 0x41be1f
lea eax, [ebp - 0x1c]
mov edx, dword [ebp - 0xc]
call fcn.00405038
mov eax, dword [ebp - 0x1c]
call fcn.0041c574
cmp al, 1
jne 0x41be1f
mov bl, 1
test bl, bl
jne 0x41be5f
mov eax, pe_nt_image_headers32
call fcn.00402e0c
mov dword [ebp - 0xc], eax
push pe_nt_image_headers32
mov eax, dword [ebp - 0xc]
push eax
call sub.KERNEL32.DLL_GetWindowsDirectoryA
test eax, eax
je 0x41be5f
test bl, bl
jne 0x41be5f
lea eax, [ebp - 0x20]
mov edx, dword [ebp - 0xc]
call fcn.00405038
mov eax, dword [ebp - 0x20]
call fcn.0041c574
cmp al, 1
jne 0x41be5f
mov bl, 1
test bl, bl
jne 0x41be6a
xor ebx, ebx
jmp 0x41bfe2
cmp bl, 1
jne 0x41bfe0
call fcn.004030c8
mov eax, 0xff
call fcn.004030f0
mov ecx, 0x34
cdq
idiv ecx
mov eax, 0x41c01c
movzx edx, byte [eax + edx]
lea eax, [ebp - 0x24]
call fcn.00405028
mov edx, dword [ebp - 0x24]
lea eax, [ebp - 4]
call fcn.0040510c
mov eax, dword [ebp - 4]
call fcn.00405100
cmp eax, 0xa
jne 0x41be78
lea eax, [ebp - 4]
mov edx, 0x41c05c
call fcn.0040510c
push 0x41c064
mov eax, dword [ebp - 0xc]
push eax
call sub.KERNEL32.DLL_lstrcatA
mov eax, dword [ebp - 4]
call fcn.004052d0
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.KERNEL32.DLL_lstrcatA
push 0
push 0x80
push 2
push 0
push 0
push 0xc0000000
mov eax, dword [ebp - 0xc]
push eax
call sub.KERNEL32.DLL_CreateFileA_1
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x41bf18
push ebx
call sub.KERNEL32.DLL_CloseHandle_1
mov eax, dword [ebp - 0xc]
push eax
call sub.KERNEL32.DLL_DeleteFileA
xor ebx, ebx
jmp 0x41bfe2
lea edx, [ebp - 0x14]
lea eax, [ebp - 0x10]
call fcn.0041c6a8
cmp dword [ebp - 0x10], 0
je 0x41bf2f
cmp dword [ebp - 0x14], 0
jne 0x41bf45
push ebx
call sub.KERNEL32.DLL_CloseHandle_1
mov eax, dword [ebp - 0xc]
push eax
call sub.KERNEL32.DLL_DeleteFileA
xor ebx, ebx
jmp 0x41bfe2
push 0
lea eax, [ebp - 8]
push eax
mov eax, dword [ebp - 0x14]
push eax
mov eax, dword [ebp - 0x10]
push eax
push ebx
call sub.KERNEL32.DLL_WriteFile_1
cmp eax, 1
sbb eax, eax
inc eax
cmp al, 1
jne 0x41bf7b
mov eax, dword [ebp - 8]
xor edx, edx
push edx
push eax
mov eax, dword [ebp - 0x14]
cdq
cmp edx, dword [esp + 4]
jne 0x41bf77
cmp eax, dword [esp]
pop edx
pop eax
je 0x41bf8e
push ebx
call sub.KERNEL32.DLL_CloseHandle_1
mov eax, dword [ebp - 0xc]
push eax
call sub.KERNEL32.DLL_DeleteFileA
xor ebx, ebx
jmp 0x41bfe2
mov eax, pe_nt_image_headers32
call fcn.00402e0c
mov dword [0x451a80], eax
mov eax, dword [0x451a80]
xor ecx, ecx
mov edx, pe_nt_image_headers32
call fcn.00403688
mov eax, dword [ebp - 0xc]
push eax
mov eax, dword [0x451a80]
push eax
call sub.KERNEL32.DLL_lstrcatA
push ebx
call sub.KERNEL32.DLL_CloseHandle_1
jmp 0x41bfe0
cmp bl, 1
jne 0x41bfe0
mov eax, dword [0x451a80]
call fcn.00402e28
mov eax, dword [ebp - 0xc]
call fcn.00402e28
mov bl, 1
jmp 0x41bfe2
mov bl, 1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x41c00c
lea eax, [ebp - 0x24]
mov edx, 4
call fcn.00404e64
lea eax, [ebp - 4]
call fcn.00404e40
ret