Function at 0x40a600
Capabilities:
Check if file exists
Create directory
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov eax, dword [0x420070]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
mov dword [ebp - 0x194], ecx
cmp dword [ebp + 8], 0
jne 0x40a62a
mov eax, 6
jmp 0x40ad50
mov eax, dword [ebp - 0x194]
cmp dword [eax + 8], 0
jne 0x40a68f
push 1
mov ecx, dword [ebp + 8]
call fcn.0040c3d0
push 0
push 0
mov ecx, dword [ebp + 8]
call fcn.0040bfb0
push 0x41b6c4
call fcn.0040f9f0
add esp, 4
push eax
push str.ErrorCreateModuleList
mov ecx, dword [ebp + 8]
call fcn.0040c0c0
mov ecx, dword [ebp + 8]
push ecx
mov ecx, dword [ebp - 0x194]
call fcn.0040a5a0
push str.Error:execUPLOAD:_Error_create_Modules_list.
push 1
call fcn.00403e50
add esp, 8
mov eax, 6
jmp 0x40ad50
mov ecx, dword [ebp + 8]
call fcn.0040c280
push eax
mov edx, dword [ebp - 0x194]
mov ecx, dword [edx + 8]
call fcn.00407c30
test eax, eax
je 0x40a703
push 1
mov ecx, dword [ebp + 8]
call fcn.0040c3d0
push 0
push 0
mov ecx, dword [ebp + 8]
call fcn.0040bfb0
push 0x41b724
call fcn.0040f9f0
add esp, 4
push eax
push str.ErrorDLLIsPresent
mov ecx, dword [ebp + 8]
call fcn.0040c0c0
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x194]
call fcn.0040a5a0
push str.Error:execUPLOAD:_Dll_is_present
push 1
call fcn.00403e50
add esp, 8
mov eax, 6
jmp 0x40ad50
mov dword [ebp - 8], 0
mov dword [ebp - 0x3c], 0x420c60
mov dword [ebp - 4], 0
mov ecx, dword [ebp + 8]
call fcn.0040c310
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp + 8]
call fcn.0040c2b0
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x150], 0
mov dword [ebp - 0x14c], 0
cmp dword [ebp - 0x10], 0
jne 0x40a7a1
push 1
mov ecx, dword [ebp + 8]
call fcn.0040c3d0
push 0
push 0
mov ecx, dword [ebp + 8]
call fcn.0040bfb0
push 0x41b770
call fcn.0040f9f0
add esp, 4
push eax
push 0x41b788
mov ecx, dword [ebp + 8]
call fcn.0040c0c0
mov ecx, dword [ebp + 8]
push ecx
mov ecx, dword [ebp - 0x194]
call fcn.0040a5a0
push str.Error:execUPLOAD:_invalid_parameter_input
push 1
call fcn.00403e50
add esp, 8
mov eax, 6
jmp 0x40ad50
mov edx, dword [0x420c08]
push edx
call fcn.0040f9f0
add esp, 4
mov dword [ebp - 0x14c], eax
lea eax, [ebp - 0x150]
push eax
mov ecx, dword [ebp - 0x14c]
push ecx
mov edx, dword [ebp - 0xc]
push edx
mov eax, dword [0x420c08]
push eax
mov ecx, dword [ebp - 0x10]
push ecx
call fcn.00403c20
add esp, 0x14
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x40a80b
lea edx, [ebp - 0x150]
push edx
mov eax, dword [ebp - 0x14c]
push eax
mov ecx, dword [ebp - 0xc]
push ecx
mov edx, dword [0x420c0c]
push edx
mov eax, dword [ebp - 0x10]
push eax
call fcn.00403c20
add esp, 0x14
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x40a81a
cmp dword [ebp - 0x150], 0
jne 0x40a873
push 1
mov ecx, dword [ebp + 8]
call fcn.0040c3d0
push 0
push 0
mov ecx, dword [ebp + 8]
call fcn.0040bfb0
push 0x41b7cc
call fcn.0040f9f0
add esp, 4
push eax
push 0x41b7e4
mov ecx, dword [ebp + 8]
call fcn.0040c0c0
mov ecx, dword [ebp + 8]
push ecx
mov ecx, dword [ebp - 0x194]
call fcn.0040a5a0
push str.Error:execUPLOAD:_invalid_param:not_DATA_section
push 1
call fcn.00403e50
add esp, 8
mov eax, 6
jmp 0x40ad50
mov edx, dword [ebp - 0xc]
sub edx, dword [ebp - 0x150]
mov dword [ebp - 0xc], edx
mov eax, dword [ebp - 0x14c]
cmp eax, dword [ebp - 0xc]
jb 0x40a8e3
push 1
mov ecx, dword [ebp + 8]
call fcn.0040c3d0
push 0
push 0
mov ecx, dword [ebp + 8]
call fcn.0040bfb0
push 0x41b830
call fcn.0040f9f0
add esp, 4
push eax
push 0x41b848
mov ecx, dword [ebp + 8]
call fcn.0040c0c0
mov ecx, dword [ebp + 8]
push ecx
mov ecx, dword [ebp - 0x194]
call fcn.0040a5a0
push str.Error:execUPLOAD:_DATA_section_is_small
push 1
call fcn.00403e50
add esp, 8
mov eax, 6
jmp 0x40ad50
mov edx, dword [ebp - 0x10]
add edx, dword [ebp - 0x14c]
mov dword [ebp - 0x10], edx
mov eax, dword [ebp - 0xc]
sub eax, dword [ebp - 0x14c]
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp + 8]
call fcn.0040b040
mov ecx, dword [ebp - 0xc]
xor esi, esi
mov dword [ebp - 0x19c], eax
mov dword [ebp - 0x198], edx
mov dword [ebp - 0x1a4], ecx
mov dword [ebp - 0x1a0], esi
mov edx, dword [ebp - 0x19c]
cmp edx, dword [ebp - 0x1a4]
jne 0x40a93c
mov eax, dword [ebp - 0x198]
cmp eax, dword [ebp - 0x1a0]
je 0x40a995
push 1
mov ecx, dword [ebp + 8]
call fcn.0040c3d0
push 0
push 0
mov ecx, dword [ebp + 8]
call fcn.0040bfb0
push 0x41b88c
call fcn.0040f9f0
add esp, 4
push eax
push str.ErrorDataSizeNotValid
mov ecx, dword [ebp + 8]
call fcn.0040c0c0
mov ecx, dword [ebp + 8]
push ecx
mov ecx, dword [ebp - 0x194]
call fcn.0040a5a0
push str.Error:execUPLOAD:_DATASIZE__is_not_Valid
push 1
call fcn.00403e50
add esp, 8
mov eax, 6
jmp 0x40ad50
push 0x21
push 0
lea edx, [ebp - 0x38]
push edx
call fcn.004100c0
add esp, 0xc
push 0x21
lea eax, [ebp - 0x38]
push eax
push 0x41b8e8
mov ecx, dword [ebp - 0x194]
call fcn.00409710
test eax, eax
jne 0x40ab3a
mov byte [ebp - 0x18], 0
lea ecx, [ebp - 0x184]
push ecx
mov edx, dword [ebp - 0xc]
push edx
mov eax, dword [ebp - 0x10]
push eax
call fcn.00402900
add esp, 0xc
push 0x21
push 0
lea ecx, [ebp - 0x174]
push ecx
call fcn.004100c0
add esp, 0xc
mov dword [ebp - 0x188], 0
jmp 0x40aa0c
mov edx, dword [ebp - 0x188]
add edx, 1
mov dword [ebp - 0x188], edx
cmp dword [ebp - 0x188], 0x10
jge 0x40aad9
mov eax, dword [ebp - 0x188]
movzx ecx, byte [ebp + eax - 0x184]
and ecx, 0xf
mov edx, dword [ebp - 0x188]
mov al, byte [ecx + str.0123456789abcdefCMD]
mov byte [ebp + edx*2 - 0x173], al
mov ecx, dword [ebp - 0x188]
movzx edx, byte [ebp + ecx - 0x184]
sar edx, 4
and edx, 0xf
mov eax, dword [ebp - 0x188]
mov cl, byte [edx + str.0123456789abcdefCMD]
mov byte [ebp + eax*2 - 0x174], cl
mov edx, dword [ebp - 0x188]
movsx eax, byte [ebp + edx*2 - 0x37]
cmp eax, 0x41
jl 0x40aa9c
mov ecx, dword [ebp - 0x188]
movsx edx, byte [ebp + ecx*2 - 0x37]
cmp edx, 0x46
jg 0x40aa9c
mov eax, dword [ebp - 0x188]
movsx ecx, byte [ebp + eax*2 - 0x37]
add ecx, 0x20
mov edx, dword [ebp - 0x188]
mov byte [ebp + edx*2 - 0x37], cl
mov eax, dword [ebp - 0x188]
movsx ecx, byte [ebp + eax*2 - 0x38]
cmp ecx, 0x41
jl 0x40aad4
mov edx, dword [ebp - 0x188]
movsx eax, byte [ebp + edx*2 - 0x38]
cmp eax, 0x46
jg 0x40aad4
mov ecx, dword [ebp - 0x188]
movsx edx, byte [ebp + ecx*2 - 0x38]
add edx, 0x20
mov eax, dword [ebp - 0x188]
mov byte [ebp + eax*2 - 0x38], dl
jmp 0x40a9fd
lea ecx, [ebp - 0x38]
push ecx
lea edx, [ebp - 0x174]
push edx
call fcn.004107a0
add esp, 8
test eax, eax
je 0x40ab3a
push 1
mov ecx, dword [ebp + 8]
call fcn.0040c3d0
push 0
push 0
mov ecx, dword [ebp + 8]
call fcn.0040bfb0
push 0x41b8ec
call fcn.0040f9f0
add esp, 4
push eax
push str.ErrorCompareCRCFail
mov ecx, dword [ebp + 8]
call fcn.0040c0c0
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x194]
call fcn.0040a5a0
mov eax, 0xe
jmp 0x40ad50
push 0
call fcn.0040ffe7
add esp, 4
push eax
call fcn.0040ffb8
add esp, 4
mov ecx, dword [ebp - 0x3c]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x40ab67
push 0
mov edx, dword [ebp - 0x3c]
push edx
call dword [sym.imp.KERNEL32.DLL_CreateDirectoryA]
mov eax, dword [ebp - 0x3c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x40ace8
call fcn.0040ffc5
push eax
mov ecx, dword [ebp - 0x3c]
push ecx
push str._s_d.dll
lea edx, [ebp - 0x148]
push edx
call fcn.0041005f
add esp, 0x10
lea eax, [ebp - 0x148]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x40abaa
jmp 0x40ac21
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 4]
add edx, 1
mov dword [ebp - 4], edx
cmp ecx, 0x7d00
jle 0x40ac14
push 1
mov ecx, dword [ebp + 8]
call fcn.0040c3d0
push 0
push 0
mov ecx, dword [ebp + 8]
call fcn.0040bfb0
push 0x41b920
call fcn.0040f9f0
add esp, 4
push eax
push str.ErrorCreateFileName
mov ecx, dword [ebp + 8]
call fcn.0040c0c0
push str.Error:execUPLOAD:_Cant_create_universal_file_name
push 1
call fcn.00403e50
add esp, 8
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x194]
call fcn.0040a5a0
xor eax, eax
jmp 0x40ad50
mov ecx, 1
test ecx, ecx
jne 0x40ab79
push 0
push 0x80
push 2
push 0
push 0
push 0xc0000000
lea edx, [ebp - 0x148]
push edx
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
mov dword [ebp - 0x190], eax
cmp dword [ebp - 0x190], 0xffffffff
jne 0x40acb3
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push eax
lea eax, [ebp - 0x148]
push eax
push str.Could_not_open_file__s__error__d__n
push 1
call fcn.00403e50
add esp, 0x10
push 1
mov ecx, dword [ebp + 8]
call fcn.0040c3d0
push 0
push 0
mov ecx, dword [ebp + 8]
call fcn.0040bfb0
push 0x41b9a0
call fcn.0040f9f0
add esp, 4
push eax
push str.ErrorOpenFileForWrite
mov ecx, dword [ebp + 8]
call fcn.0040c0c0
mov ecx, dword [ebp + 8]
push ecx
mov ecx, dword [ebp - 0x194]
call fcn.0040a5a0
xor eax, eax
jmp 0x40ad50
mov dword [ebp - 0x18c], 0
push 0
lea edx, [ebp - 0x18c]
push edx
mov eax, dword [ebp - 0xc]
push eax
mov ecx, dword [ebp - 0x10]
push ecx
mov edx, dword [ebp - 0x190]
push edx
call dword [sym.imp.KERNEL32.DLL_WriteFile]
mov eax, dword [ebp - 0x190]
push eax
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
push 0x420c60
mov ecx, dword [ebp - 0x194]
mov ecx, dword [ecx + 8]
call fcn.004074e0
mov edx, dword [ebp + 8]
push edx
mov ecx, dword [ebp - 0x194]
call fcn.0040ad70
test eax, eax
je 0x40ad3f
push 0
mov ecx, dword [ebp + 8]
call fcn.0040c3d0
push 0
push 0
mov ecx, dword [ebp + 8]
call fcn.0040bfb0
push 0x41b9d0
call fcn.0040f9f0
add esp, 4
push eax
push 0x41b9d4
mov ecx, dword [ebp + 8]
call fcn.0040c0c0
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x194]
call fcn.0040a5a0
xor eax, eax
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00410051
mov esp, ebp
pop ebp
ret 4