Function at 0x408c30
Capabilities:
Delete file
Get file size
Read file on windows
Set file attributes
Write file on windows

Disassembly:
sub esp, 0x834
mov eax, dword [0x5b0c20]
xor eax, esp
mov dword [esp + 0x830], eax
mov eax, dword [esp + 0x838]
mov ecx, dword [esp + 0x83c]
mov edx, dword [esp + 0x840]
push ebx
push ebp
xor ebx, ebx
push 0x1f0
mov dword [esp + 0x14], eax
lea eax, [esp + 0x34]
push ebx
push eax
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x30], edx
or ebp, 0xffffffff
mov dword [esp + 0x28], ebx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], ebx
call fcn.00526520
lea ecx, [esp + 0x34]
push ecx
call fcn.00414c90
add esp, 0x10
test eax, eax
jne 0x408cb4
pop ebp
pop ebx
mov ecx, dword [esp + 0x830]
xor ecx, esp
call fcn.00524d83
add esp, 0x834
ret
push esi
push edi
push 8
lea edx, [esp + 0x34]
push edx
lea eax, [esp + 0x40]
push 0x60
push eax
call fcn.00455b60
mov ecx, 0x18
lea esi, [esp + 0x48]
lea edi, [esp + 0xa8]
add esp, 0x10
rep movsd dword es:[edi], dword [esi]
xor eax, eax
movzx ecx, word [eax + 0x5b2994]
mov word [esp + eax + 0x430], cx
add eax, 2
cmp cx, bx
jne 0x408ce0
lea edi, [esp + 0x430]
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
cmp ax, bx
jne 0x408d01
mov ecx, 7
mov esi, 0x551500
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x638]
push ecx
lea edx, [esp + 0x434]
push edx
lea eax, [esp + 0x40]
push eax
movsw word es:[edi], word [esi]
call fcn.004073f0
add esp, 0xc
test eax, eax
je 0x408d61
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileW]
push ebx
push ebx
push 3
push ebx
push 7
push closesocket
lea ecx, [esp + 0x650]
push ecx
call esi
mov dword [esp + 0x1c], eax
cmp eax, 0xffffffff
jne 0x408d68
xor eax, eax
jmp 0x409064
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x409035
mov edi, dword [esp + 0x18]
mov ecx, dword [edi + 0x35c]
xor edx, edx
div ecx
imul eax, ecx
cmp eax, ebx
jae 0x408d9c
mov eax, ebx
xor edx, edx
div ecx
inc eax
imul eax, ecx
mov ebx, eax
push ebx
call fcn.00401bb0
mov edi, eax
add esp, 4
mov dword [esp + 0x14], edi
test edi, edi
je 0x409039
mov ecx, dword [esp + 0x18]
push ecx
call fcn.00407ec0
push eax
add ecx, 2
push ecx
lea edx, [esp + 0x234]
push 0x5516e0
push edx
call fcn.00525f70
add esp, 0x14
push 0x26
lea eax, [esp + 0x22c]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
je 0x408df9
lea ecx, [esp + 0x228]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 0
push 0xa0000026
push 2
push 0
push 7
push 0xc0000000
lea edx, [esp + 0x240]
push edx
call esi
mov ebp, eax
cmp ebp, 0xffffffff
je 0x409039
xor eax, eax
test ebx, ebx
jbe 0x408e51
jmp 0x408e30
add edi, eax
mov ecx, 0x80
mov esi, str.j:Y
add eax, 0x200
rep movsd dword es:[edi], dword [esi]
mov edi, dword [esp + 0x14]
cmp eax, ebx
jb 0x408e30
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileW]
push 0
lea eax, [esp + 0x14]
push eax
push ebx
push edi
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x409039
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0
push 0x26
push 3
push 0
push 7
push 0xc0000000
lea ecx, [esp + 0x240]
push ecx
call esi
mov ebp, eax
cmp ebp, 0xffffffff
je 0x409039
mov edx, dword [esp + 0x1c]
mov esi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
push 0
push 0
push edx
call esi
test eax, eax
jne 0x409039
push eax
push eax
push eax
push ebp
call esi
test eax, eax
jne 0x409039
mov eax, dword [str.j:Y]
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [edi], eax
mov ecx, dword [0x59f644]
mov dword [edi + 4], ecx
mov edx, dword [0x59f648]
mov dword [edi + 8], edx
mov eax, dword [0x59f64c]
mov dword [edi + 0xc], eax
lea ebx, [edi + 0x10]
jmp 0x408ef0
mov edx, dword [esp + 0x1c]
push 0
lea ecx, [esp + 0x24]
push ecx
push 0x1f0
push ebx
push edx
call esi
test eax, eax
mov eax, dword [esp + 0x20]
je 0x408f10
test eax, eax
je 0x408f3d
push 0
lea ecx, [esp + 0x14]
push ecx
add eax, 0x10
push eax
push edi
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x409039
mov edx, dword [esp + 0x20]
add edx, 0x10
cmp dword [esp + 0x10], edx
je 0x408ef0
jmp 0x409039
push ebp
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x228]
push eax
push ecx
push 0x3d
push edi
push ebp
call fcn.0044d050
add esp, 0x14
test eax, eax
je 0x409039
mov ebx, dword [esp + 0x28]
mov esi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
push 0
push 0x13e18
push ebx
call esi
cmp eax, 0x13e18
jne 0x409039
push 0
lea edx, [esp + 0x14]
push edx
push 0x1e8
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x409039
push 0
push 0
push 0x14010
push ebx
call esi
cmp eax, 0x14010
jne 0x409039
mov esi, dword [esp + 0x2c]
movzx eax, byte [esi + 0xe]
movzx ecx, word [esi + 0xc]
mov edx, dword [esi + 8]
push 0xffffffffffffffff
push eax
mov eax, dword [esi]
push ecx
push edx
push eax
lea ecx, [esp + 0x4c]
push ecx
mov edx, ecx
push edx
call fcn.004538f0
add esp, 0x1c
test eax, eax
je 0x409039
movzx eax, byte [esi + 0xe]
movzx ecx, word [esi + 0xc]
mov edx, dword [esi + 8]
push 0xffffffffffffffff
push eax
mov eax, dword [esi + 4]
push ecx
push edx
push eax
lea ecx, [esp + 0xac]
push ecx
mov edx, ecx
push edx
call fcn.004538f0
add esp, 0x1c
test eax, eax
je 0x409039
push 0
lea eax, [esp + 0x14]
push eax
push 0x1f0
lea ecx, [esp + 0x44]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x409039
mov dword [esp + 0x24], 1
jmp 0x409039
mov edi, dword [esp + 0x14]
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x409048
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebp, ebp
je 0x409053
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
je 0x409060
push edi
call fcn.00401bc0
add esp, 4
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x840]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00524d83
add esp, 0x834
ret