Function at 0x4c8145
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x134
mov eax, dword [0x5c4e68]
xor eax, esp
mov dword [esp + 0x130], eax
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0xc]
push 0x103
lea eax, [esp + 0x35]
push 0
push eax
mov dword [esp + 0x1c], edi
mov byte [esp + 0x3c], 0
call fcn.005117f0
add esp, 0xc
mov edx, edi
call fcn.004c3b34
test eax, eax
je 0x4c8197
xor eax, eax
jmp 0x4c848a
and dword [esp + 0x18], 0
mov ebx, 0x104
push edi
mov ecx, ebx
lea eax, [esp + 0x34]
call fcn.004c3b66
pop ecx
mov edx, eax
call fcn.004c470f
cmp byte [esp + 0x30], 0x5c
jne 0x4c82a3
cmp byte [esp + 0x31], 0x5c
jne 0x4c82a3
cmp dword [ebp + 0x14], 0
je 0x4c81f2
mov eax, esi
call fcn.004c8095
cmp eax, 0xc
jge 0x4c81f2
push 0
mov ecx, edi
call fcn.0042b397
cmp eax, 0x100000
pop ecx
jbe 0x4c82a3
mov edx, edi
lea ecx, [esp + 0x30]
call fcn.0048a38c
cmp dword [ebp + 0x14], 0
je 0x4c8288
call fcn.0042ad00
test eax, eax
je 0x4c8288
push 0
lea eax, [esp + 0x34]
push eax
push edi
call fcn.0042a5f2
add esp, 0xc
test eax, eax
jne 0x4c8288
push str._GetLastError_
lea eax, [esp + 0x34]
push eax
push edi
push str.SaveStringListToFile
push str.:2:_s___EAP:_Failed_to_copy_locally:_CopyFile___s_____s___FAILED:__s
call fcn.00426c01
add esp, 0x14
lea eax, [esp + 0x30]
call fcn.0042a76b
push edi
mov ecx, ebx
lea eax, [esp + 0x34]
call fcn.004c3b66
pop ecx
xor ebx, ebx
xor edi, edi
inc edi
cmp dword [ebp + 0x14], ebx
mov dword [esp + 0x2c], edi
lea ecx, [esp + 0x30]
je 0x4c82ab
push ebx
call fcn.0042b397
test eax, eax
pop ecx
jbe 0x4c8278
mov dword [esp + 0x2c], ebx
push 0x504
mov edx, 0x5304c8
lea ecx, [esp + 0x34]
jmp 0x4c82b5
lea eax, [esp + 0x30]
push edi
push eax
call fcn.00512a33
test eax, eax
pop ecx
pop ecx
je 0x4c8257
mov dword [esp + 0x18], 1
jmp 0x4c8257
xor ebx, ebx
mov dword [esp + 0x18], ebx
jmp 0x4c8259
push 0x506
mov edx, 0x53048c
push str..StringList.c
call fcn.0042d2c6
cmp eax, ebx
pop ecx
mov dword [esp + 0x18], eax
pop ecx
jne 0x4c82f5
push dword [ebp + 0x14]
push dword [esp + 0x14]
push str.:4:SaveStringListToFile___FAILED:_fopen__s__FAILED:_bAppendToFile___d
call fcn.004265da
add esp, 0xc
cmp dword [esp + 0x18], ebx
je 0x4c8190
lea eax, [esp + 0x30]
call fcn.0042a76b
jmp 0x4c8190
mov eax, esi
call fcn.004c916e
test eax, eax
jne 0x4c830b
mov ecx, dword [esp + 0x14]
call fcn.0042d70e
jmp 0x4c82dd
lea ecx, [esi + 0x34]
mov eax, 0x1b58
call fcn.004329ce
call fcn.004f16be
cmp dword [ebp + 0x10], ebx
mov dword [esp + 0x28], eax
je 0x4c832b
mov eax, dword [esi + 0xc]
jmp 0x4c832d
xor eax, eax
cmp eax, dword [esi + 4]
mov dword [esp + 0x24], edi
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], eax
jge 0x4c8428
shl eax, 4
mov edi, eax
mov eax, dword [esi]
xor ebx, ebx
cmp dword [edi + eax], ebx
je 0x4c8412
cmp dword [esp + 0x24], ebx
je 0x4c8365
cmp dword [ebp + 0x14], ebx
je 0x4c837a
cmp dword [esp + 0x2c], ebx
jne 0x4c837a
push dword [esp + 0x14]
push 1
push 1
push 0x530220
call fcn.005110f1
add esp, 0x10
mov eax, dword [esi]
push dword [eax + edi]
mov dword [esp + 0x28], ebx
call fcn.005120b0
mov ebx, eax
test ebx, ebx
pop ecx
jle 0x4c83bc
mov eax, dword [esi]
push dword [eax + edi]
push 0x5304c0
push dword [esp + 0x1c]
call fcn.004b4bff
add esp, 0xc
cmp eax, ebx
jge 0x4c83bc
mov eax, dword [esi]
push dword [eax + edi]
push str.:7:SaveStringListToFile___FAILED:_fprintf_fp____s_n___FAILED_
call fcn.004265da
pop ecx
pop ecx
jmp 0x4c83c0
inc dword [esp + 0x1c]
mov eax, dword [esp + 0x20]
push 0x19
cdq
pop ecx
idiv ecx
test edx, edx
jne 0x4c8412
call fcn.004f16be
sub eax, dword [esp + 0x28]
cmp eax, 0x7d0
jbe 0x4c8412
mov eax, esi
call fcn.004c919a
push 2
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, esi
call fcn.004c916e
test eax, eax
je 0x4c849f
mov eax, 0x1b58
lea ecx, [esi + 0x34]
call fcn.004329ce
call fcn.004f16be
mov dword [esp + 0x28], eax
inc dword [esp + 0x20]
mov eax, dword [esp + 0x20]
add edi, 0x10
cmp eax, dword [esi + 4]
jl 0x4c8347
xor ebx, ebx
mov eax, esi
call fcn.004c919a
mov ecx, dword [esp + 0x14]
call fcn.0042d70e
cmp dword [esp + 0x18], ebx
je 0x4c8486
push ebx
push dword [esp + 0x14]
lea eax, [esp + 0x38]
push eax
call fcn.0042a5f2
add esp, 0xc
test eax, eax
jne 0x4c847d
lea edi, [esp + 0x30]
call fcn.0042ad00
mov edi, dword [esp + 0x10]
push eax
push ecx
call fcn.0042ad00
pop ecx
push eax
lea eax, [esp + 0x38]
push eax
push edi
push str.:6:SaveStringListToFile___s___FAILED:_Could_not_move_file_from_temp___s_:_bDoesExist___d__d
call fcn.004265da
add esp, 0x14
lea eax, [esp + 0x30]
call fcn.0042a76b
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x13c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0051291c
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0x14]
call fcn.0042d70e
push dword [esp + 0x10]
push str.:4:SaveStringListToFile___s___FAILED:_The_handle_was_deleted_while_saving_
call fcn.004265da
cmp dword [esp + 0x20], 0
pop ecx
pop ecx
je 0x4c8486
jmp 0x4c82e7