Function at 0x419bc0
Capabilities:
Check if file exists
Create directory
Delete file
Get file size
Move file
Print debug messages
Read file on windows
Resolve function by parsing pe exports
Set file attributes

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x50a4
call fcn.005c3ef0
mov eax, dword [0x6ce488]
xor eax, esp
mov dword [esp + 0x50a0], eax
mov eax, dword [ebp + 8]
xorps xmm0, xmm0
push ebx
mov dword [0x6d921c], eax
mov eax, dword [ebp + 0xc]
push esi
push edi
xor edi, edi
mov dword [0x6d9218], eax
lea eax, [esp + 0x84]
mov dword [esp + 0x78], ecx
mov dword [esp + 0x18], edi
mov dword [esp + 0x5c], edi
movlpd qword [esp + 0x48], xmm0
mov dword [esp + 0x60], edi
mov dword [esp + 0x20], 0x41d3a0
mov dword [esp + 0x24], 0x41d3c0
mov dword [esp + 0x7c], 0x41d3a0
mov dword [esp + 0x80], 0x41d3c0
mov dword [0x6d9220], edi
mov dword [esp + 0x8c], edi
mov dword [esp + 0x84], 0x41d260
mov dword [esp + 0x88], 0x41d2d0
mov dword [esp + 0xe8], 0x41d450
mov dword [esp + 0xec], 0x41d4b0
mov dword [esp + 0xf0], 0x41d4c0
mov dword [esp + 0xf4], 0x41d510
mov dword [esp + 0xf8], eax
mov dword [esp + 0x100], edi
mov dword [esp + 0xfc], edi
call fcn.0041d530
lea ecx, [esp + 0x98]
call fcn.0041ab10
lea eax, [esp + 0x7c]
push eax
lea eax, [esp + 0x24]
push eax
lea edx, [esp + 0xf0]
call fcn.0041ca60
mov ebx, eax
add esp, 8
mov dword [esp + 0x1c], ebx
test ebx, ebx
je 0x419ce6
lea edx, [esp + 0x20]
lea ecx, [esp + 0x98]
call fcn.0041ab80
test ebx, ebx
jne 0x41a144
mov esi, dword [esp + 0xb4]
xor ebx, ebx
push ebx
push ebx
xor eax, eax
mov dword [esp + 0x7c], 0xffffffff
push esi
push ebx
mov dword [esp + 0x50], eax
mov dword [esp + 0x80], eax
mov dword [esp + 0x20], ebx
call fcn.00405650
test esi, esi
mov esi, dword [esp + 0xa8]
je 0x419d47
mov ecx, dword [esp + 0xb4]
lea eax, [esi + 8]
xor edi, edi
cmp byte [eax + 0x11], 0
jne 0x419d32
add edi, dword [eax]
jmp 0x419d33
inc ebx
add eax, 0x20
sub ecx, 1
jne 0x419d28
mov dword [esp + 0x60], edi
mov edi, dword [esp + 0x18]
mov dword [esp + 0x10], ebx
lea eax, [ebx*4]
push eax
call fcn.0061435b
add esp, 4
mov dword [esp + 0x44], eax
lea eax, [ebx*8]
push eax
call fcn.0061435b
xor edx, edx
add esp, 4
mov ecx, eax
mov dword [esp + 0x3c], edx
mov dword [esp + 0x6c], ecx
cmp dword [esp + 0xb4], edx
jbe 0x41a096
mov eax, dword [esp + 0x4c]
add esi, 0x19
mov dword [esp + 0x68], ecx
mov ecx, dword [esp + 0x44]
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x48]
mov dword [esp + 0x64], ecx
mov dword [esp + 0x14], esi
mov dword [esp + 0x2c], eax
nop word [eax + eax]
mov ebx, dword [esp + 0xd8]
xor eax, eax
mov dword [esp + 0x58], eax
mov dword [esp + 0x38], eax
mov esi, dword [ebx + edx*4 + 4]
sub esi, dword [ebx + edx*4]
cmp esi, dword [esp + 0x5c]
jbe 0x419dfe
push edi
call fcn.006140b6
add esp, 4
mov dword [esp + 0x5c], esi
add esi, esi
je 0x41a7a1
push esi
call fcn.0061435b
mov edi, eax
add esp, 4
mov dword [esp + 0x18], edi
test edi, edi
je 0x41a7a9
mov edx, dword [esp + 0x3c]
mov ecx, dword [ebx + edx*4]
mov edx, dword [ebx + edx*4 + 4]
sub edx, ecx
test edi, edi
je 0x419e30
mov eax, dword [esp + 0xdc]
lea esi, [eax + ecx*2]
test edx, edx
je 0x419e30
mov ecx, edi
sub esi, edi
nop dword [eax]
mov ax, word [esi + ecx]
lea ecx, [ecx + 2]
mov word [ecx - 2], ax
sub edx, 1
jne 0x419e20
mov ecx, edi
call fcn.00419b00
mov ebx, eax
mov dword [esp + 0x1c], ebx
test ebx, ebx
jne 0x41a092
mov ebx, dword [esp + 0x14]
movzx ecx, byte [ebx]
push ecx
push edi
push eax
push 3
call fcn.00405650
mov cl, byte [ebx]
test eax, eax
jne 0x419e71
mov edx, dword [esp + 0x10]
test cl, cl
lea eax, [edx - 1]
cmove eax, edx
mov dword [esp + 0x10], eax
jmp 0x41a075
test cl, cl
jne 0x419ec4
lea eax, [esp + 0x7c]
push eax
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0x40]
push eax
lea eax, [esp + 0x64]
push eax
lea eax, [esp + 0x80]
push eax
lea eax, [esp + 0x54]
push eax
lea eax, [esp + 0x8c]
push eax
push dword [esp + 0x58]
lea edx, [esp + 0x108]
lea ecx, [esp + 0xb8]
call fcn.0041cfa0
add esp, 0x20
mov dword [esp + 0x1c], eax
test eax, eax
jne 0x41a092
push 0xfa0
lea eax, [esp + 0x410c]
push 0
push eax
call fcn.005feb40
mov ecx, dword [esp + 0x84]
lea edx, [esp + 0x4114]
add esp, 0xc
sub edx, ecx
nop dword [eax + eax]
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [edx + ecx - 2], ax
test ax, ax
jne 0x419ef0
movzx eax, word [edi]
xor edx, edx
mov esi, eax
test ax, ax
je 0x419f2d
mov ecx, edi
lea ebx, [edx + 0x5c]
cmp si, 0x2f
jne 0x419f1a
mov word [ecx], bx
inc edx
movzx eax, word [edi + edx*2]
lea ecx, [edi + edx*2]
mov esi, eax
test ax, ax
jne 0x419f11
mov ebx, dword [esp + 0x14]
lea edi, [esp + 0x4108]
add edi, 0xfffffffe
nop word [eax + eax]
mov ax, word [edi + 2]
lea edi, [edi + 2]
test ax, ax
jne 0x419f40
mov eax, dword [0x6a2f8c]
mov edx, dword [esp + 0x18]
mov esi, edx
mov dword [edi], eax
nop dword [eax]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x419f60
lea edi, [esp + 0x4108]
sub edx, esi
add edi, 0xfffffffe
nop word [eax + eax]
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x419f80
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov edx, dword [esp + 0x30]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x2c]
call fcn.005c4490
mov eax, dword [esp + 0x60]
movd xmm1, eax
cvtdq2pd xmm1, xmm1
shr eax, 0x1f
cmp byte [ebx], 0
addsd xmm1, qword [eax*8 + 0x6adda0]
lea eax, [esp + 0x4108]
divsd xmm0, xmm1
mulsd xmm0, qword [0x6adbb8]
movsd qword [esp + 0x48], xmm0
je 0x41a213
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x419ff4
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [esp + 0x4108]
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x41a000
sub ecx, edx
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
call fcn.0061435b
mov esi, dword [esp + 0x68]
lea edx, [esp + 0x410c]
add esp, 4
mov dword [esi], eax
nop dword [eax]
movzx ecx, word [edx]
lea edx, [edx + 2]
mov word [eax], cx
lea eax, [eax + 2]
test cx, cx
jne 0x41a030
mov ecx, dword [esp + 0x68]
add esi, 4
mov eax, dword [ebx - 0x19]
mov dword [esp + 0x64], esi
mov dword [ecx], eax
mov eax, dword [ebx - 0x15]
mov dword [ecx + 4], eax
add ecx, 8
mov dword [esp + 0x68], ecx
mov edi, dword [esp + 0x18]
movzx eax, byte [ebx]
push eax
cvttsd2si eax, qword [esp + 0x4c]
push edi
push eax
push 1
call fcn.00405650
mov edx, dword [esp + 0x3c]
add ebx, 0x20
inc edx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x3c], edx
cmp edx, dword [esp + 0xb4]
jb 0x419db0
mov ebx, dword [esp + 0x10]
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileW]
push dword [esp + 0x40]
lea eax, [esp + 0x24]
push eax
call dword [esp + 0x2c]
add esp, 8
xor esi, esi
test ebx, ebx
jle 0x41a109
mov ebx, dword [esp + 0x6c]
nop word [eax + eax]
mov eax, dword [esp + 0x44]
push 0
push 0x2000000
push 3
push 0
push 3
push 0x40000000
push dword [eax + esi*4]
call edi
mov edi, eax
cmp edi, 0xffffffff
je 0x41a0f5
push ebx
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileW]
inc esi
add ebx, 8
cmp esi, dword [esp + 0x10]
jl 0x41a0c0
mov ebx, dword [esp + 0x10]
xor esi, esi
test ebx, ebx
jle 0x41a124
nop
mov eax, dword [esp + 0x44]
push dword [eax + esi*4]
call fcn.006140b6
inc esi
add esp, 4
cmp esi, ebx
jl 0x41a110
push dword [esp + 0x44]
call fcn.006140b6
add esp, 4
push dword [esp + 0x6c]
call fcn.006140b6
mov ebx, dword [esp + 0x20]
add esp, 4
mov edi, dword [esp + 0x18]
push dword [esp + 0xc8]
lea eax, [esp + 0x24]
push eax
call dword [esp + 0x2c]
push dword [esp + 0xd4]
lea eax, [esp + 0x2c]
push eax
call dword [esp + 0x34]
push dword [esp + 0xe0]
lea eax, [esp + 0x34]
push eax
call dword [esp + 0x3c]
push dword [esp + 0xec]
lea eax, [esp + 0x3c]
push eax
call dword [esp + 0x44]
push dword [esp + 0xf8]
lea eax, [esp + 0x44]
push eax
call dword [esp + 0x4c]
push dword [esp + 0x104]
lea eax, [esp + 0x4c]
push eax
call dword [esp + 0x54]
lea edx, [esp + 0x50]
mov dword [esp + 0x10c], 0
lea ecx, [esp + 0xc8]
mov dword [esp + 0x110], 0
call fcn.0041a990
lea ecx, [esp + 0xc8]
call fcn.0041ab10
push edi
call fcn.006140b6
mov eax, dword [esp + 0xc0]
add esp, 0x34
cmp eax, 0xffffffff
je 0x41a1fc
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x41a1fc
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 0x50ac]
mov eax, ebx
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.005c358e
mov esp, ebp
pop ebp
ret
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
lea eax, [esp + 0x4108]
je 0x41a60b
mov edi, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push eax
call edi
push 0x6a475c
call edi
push 0
push 0x80
push 3
push 0
push 1
push accept
lea eax, [esp + 0x4120]
mov dword [esp + 0x4c], 1
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x41a276
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x41a3b3
push str.InFile_OpenW_sz_ok
xor ebx, ebx
call edi
lea eax, [esp + 0x90]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
mov eax, dword [esp + 0x38]
cmp dword [esp + 0x90], eax
jne 0x41a400
cmp dword [esp + 0x94], ebx
jne 0x41a400
push 0x8000
call fcn.0061435b
add esp, 4
mov edi, eax
mov dword [esp + 0x28], edi
push str.ReadFile_begin
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push ebx
push ebx
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
lea eax, [esp + 0x58]
push eax
push 0x8000
push edi
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x41a390
nop
cmp ebx, dword [esp + 0x38]
jae 0x41a390
mov edx, dword [esp + 0x40]
mov ecx, edi
add edx, dword [esp + 0x58]
mov edi, dword [esp + 0x54]
add edx, ebx
sub edi, 4
jb 0x41a321
nop
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x41a326
add ecx, 4
add edx, 4
sub edi, 4
jae 0x41a310
cmp edi, 0xfffffffc
je 0x41a353
mov al, byte [ecx]
cmp al, byte [edx]
jne 0x41a384
cmp edi, 0xfffffffd
je 0x41a353
mov al, byte [ecx + 1]
cmp al, byte [edx + 1]
jne 0x41a384
cmp edi, 0xfffffffe
je 0x41a353
mov al, byte [ecx + 2]
cmp al, byte [edx + 2]
jne 0x41a384
cmp edi, 0xffffffff
je 0x41a353
mov al, byte [ecx + 3]
cmp al, byte [edx + 3]
jne 0x41a384
add ebx, dword [esp + 0x54]
push str.ReadFile_ing
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov edi, dword [esp + 0x28]
lea eax, [esp + 0x54]
push 0
push eax
push 0x8000
push edi
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x41a2f0
jmp 0x41a390
mov edi, dword [esp + 0x28]
mov dword [esp + 0x34], 0
push edi
call fcn.006140b6
add esp, 4
cmp esi, 0xffffffff
je 0x41a3af
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x41a3af
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, dword [esp + 0x14]
mov esi, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push str.IsFileEqual_return
call esi
cmp dword [esp + 0x34], 0
je 0x41a423
push 0x6a4768
call esi
movzx eax, byte [ebx]
mov edi, dword [esp + 0x18]
push eax
cvttsd2si eax, qword [esp + 0x4c]
push edi
push eax
push 1
call fcn.00405650
mov eax, dword [esp + 0x2c]
add eax, dword [ebx - 0x11]
mov ecx, dword [esp + 0x30]
adc ecx, dword [ebx - 0xd]
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], ecx
jmp 0x41a075
cmp esi, 0xffffffff
je 0x41a416
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x41a416
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push str.GetFileSizeEx_failed
call esi
lea eax, [esp + 0x4108]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x41a50d
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileW]
lea eax, [esp + 0x4108]
push 0
push 0x80
push 2
push 0
push 1
push 0x40000000
push eax
call edi
mov esi, eax
mov dword [esp + 0x28], esi
cmp esi, 0xffffffff
jne 0x41a478
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x1c], eax
test eax, eax
jne 0x41a7db
mov ebx, dword [esp + 0x14]
mov eax, dword [esp + 0x2c]
add eax, dword [ebx - 0x11]
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x58]
mov edi, dword [esp + 0x38]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x30]
adc eax, dword [ebx - 0xd]
lea edx, [edx + ecx]
mov dword [esp + 0x30], eax
lea ecx, [esp + 0x28]
lea eax, [esp + 0x34]
mov dword [esp + 0x34], edi
push eax
call fcn.0041d1f0
add esp, 4
mov dword [esp + 0x1c], eax
test eax, eax
jne 0x41a092
cmp dword [esp + 0x34], edi
jne 0x41a092
cmp byte [ebx + 3], al
je 0x41a4e4
test esi, esi
je 0x41a4e4
lea eax, [ebx - 0x19]
push eax
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
cmp esi, 0xffffffff
je 0x41a776
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x41a776
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov dword [esp + 0x1c], eax
jmp 0x41a77c
push 0x7d0
call fcn.0061435b
add esp, 4
mov edi, eax
push 0x6a4778
call esi
push 0
call fcn.006139f5
add esp, 4
push eax
call fcn.00614349
add esp, 4
call fcn.00614328
cdq
mov ecx, accept
idiv ecx
lea eax, [esp + 0x4108]
mov ebx, edx
push ebx
push eax
push str._s__d.dat
push edi
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
push edi
call esi
push 0
push 0x80
push 2
push 0
push 1
push 0x40000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [esp + 0x28], esi
cmp esi, 0xffffffff
jne 0x41a596
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x1c], eax
test eax, eax
jne 0x41a7b6
push 0x6a47a8
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push edi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push 0x6a47bc
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
lea eax, [esp + 0x4108]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push 5
lea eax, [esp + 0x410c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
push ebx
push dword [esp + 0x1c]
push str._s__d.dat
push edi
call dword [sym.imp.USER32.dll_wsprintfW]
mov ebx, dword [esp + 0x24]
add esp, 0x10
movzx eax, byte [ebx]
push eax
cvttsd2si eax, qword [esp + 0x4c]
push edi
push eax
push 1
call fcn.00405650
push edi
call fcn.006140b6
add esp, 4
jmp 0x41a47c
push 0
push 0x80
push 2
push 0
push 1
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [esp + 0x28], esi
cmp esi, 0xffffffff
jne 0x41a47c
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
test eax, eax
je 0x41a47c
push 0
lea eax, [esp + 0x410c]
push eax
push 0
push 2
call fcn.00405650
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0
push 0x80
push 2
push 0
push 1
push 0x40000000
lea eax, [esp + 0x4120]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [esp + 0x28], esi
cmp esi, 0xffffffff
jne 0x41a47c
call edi
test eax, eax
je 0x41a47c
push 0x400
call fcn.0061435b
add esp, 4
mov edi, eax
push 0
call fcn.006139f5
add esp, 4
push eax
call fcn.00614349
add esp, 4
call fcn.00614328
cdq
mov ecx, 0x64
idiv ecx
lea eax, [esp + 0x4108]
mov ebx, edx
push ebx
push eax
push str._s_02d
push edi
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x41a6f5
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 0
push 0x80
push 2
push 0
push 1
push 0x40000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [esp + 0x28], esi
cmp esi, 0xffffffff
jne 0x41a72b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x1c], eax
test eax, eax
jne 0x41a7b6
push 0x6a47dc
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push edi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push 0x6a47bc
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
lea eax, [esp + 0x4108]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push 5
lea eax, [esp + 0x410c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
push ebx
push dword [esp + 0x1c]
push str._s_02d
jmp 0x41a5dc
xor ebx, ebx
mov dword [esp + 0x1c], ebx
test ebx, ebx
jne 0x41a7c4
mov ebx, dword [esp + 0x14]
cmp byte [ebx + 4], 0
je 0x41a05e
push dword [ebx - 5]
mov edi, dword [esp + 0x1c]
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
jmp 0x41a062
mov dword [esp + 0x18], 0
mov dword [esp + 0x1c], 2
jmp 0x41a092
push edi
call fcn.006140b6
add esp, 4
jmp 0x41a092
push str.can_not_close_output_file
push str._nERROR:__s_n
call fcn.00419850
add esp, 8
jmp 0x41a092
mov ebx, dword [esp + 0x10]
jmp 0x41a09c