Function at 0x10005840
Capabilities:
Delete file
Get file size
Read file on windows
Write file on windows

Disassembly:
sub esp, 0x12c
push ebx
push ebp
push esi
mov ebp, ecx
push edi
xor ebx, ebx
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x39]
mov byte [esp + 0x38], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
xor eax, eax
lea edi, [ebp + 0x1cbe]
mov dword [esp + 0x22], eax
or ecx, 0xffffffff
mov dword [esp + 0x26], eax
lea edx, [esp + 0x38]
mov dword [esp + 0x2a], eax
mov dword [esp + 0x30], ebp
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov word [esp + 0x2e], ax
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x38]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
mov word [esp + 0x20], bx
rep movsb byte es:[edi], byte [esi]
mov edi, str.Config_
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov dword [esp + 0x14], ebx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov al, byte [ebp + 0xd7e]
mov ecx, edx
and ecx, 3
cmp al, bl
mov dword [esp + 0x34], 0xf54dc871
mov dword [esp + 0x10], ebx
mov dword [esp + 0x1c], ebx
rep movsb byte es:[edi], byte [esi]
je 0x10005949
cmp al, 1
je 0x10005949
cmp al, 2
jne 0x1000591e
lea eax, [ebp + 0xc86]
push 0x79
push eax
call fcn.10007990
add esp, 8
add ebp, 0xbc4
lea ecx, [esp + 0x38]
push eax
push ebp
push str._s._08X.itm.plus
push 0x5c
push ecx
jmp 0x1000596e
cmp al, 3
jne 0x10005982
lea edx, [ebp + 0xd02]
push 0x79
push edx
call fcn.10007990
add esp, 8
add ebp, 0xbc4
push eax
push ebp
push str._s._08X.itm.plus
lea eax, [esp + 0x44]
push 0x5c
push eax
jmp 0x1000596e
lea ecx, [ebp + 0xc0a]
push 0x79
push ecx
call fcn.10007990
add esp, 8
add ebp, 0xbc4
lea edx, [esp + 0x38]
push eax
push ebp
push str._s._08X.itm.plus
push 0x5c
push edx
call dword [sym.imp.MSVCRT.dll_strrchr]
add esp, 8
inc eax
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x10
mov ebp, dword [esp + 0x140]
mov eax, dword [esp + 0x144]
cmp ebp, ebx
je 0x10005a95
cmp eax, ebx
je 0x10005c1a
lea eax, [esp + 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
push ebx
push 0x80
push 2
push ebx
push 3
lea ecx, [esp + 0x4c]
push 0x40000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x10005c37
mov eax, dword [esp + 0x20]
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
and eax, 0xffff
push ebx
lea edx, [eax + eax*8]
lea eax, [eax + edx*8]
lea ecx, [eax + eax*4]
mov eax, dword [esp + 0x26]
and eax, 0xffff
mov edx, eax
shl edx, 4
sub edx, eax
lea eax, [ecx + edx*2]
mov ecx, dword [esp + 0x2a]
and ecx, 0xffff
add eax, ecx
lea ecx, [esp + 0x38]
lea edx, [eax + eax*2]
lea eax, [esp + 0x14]
push eax
push 4
shl edx, 3
push ecx
push esi
mov dword [esp + 0x28], edx
call edi
lea edx, [esp + 0x10]
push ebx
push edx
lea eax, [esp + 0x1c]
push 4
push eax
push esi
call edi
mov ecx, dword [esp + 0x144]
push ecx
push ebp
call fcn.10007990
add esp, 8
lea edx, [esp + 0x10]
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x1c]
push ebx
push edx
push 4
push eax
push esi
call edi
lea ecx, [esp + 0x10]
push ebx
push ecx
lea edx, [esp + 0x14c]
push 4
push edx
push esi
call edi
mov ecx, dword [esp + 0x144]
lea eax, [esp + 0x10]
push ebx
push eax
push ecx
push ebp
push esi
call edi
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x12c
ret 8
cmp eax, ebx
jne 0x10005c1a
lea edx, [esp + 0x20]
push edx
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
push ebx
push 0x80
push 3
push ebx
push 3
lea eax, [esp + 0x4c]
push closesocket
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x10005c37
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
lea ecx, [esp + 0x10]
push ebx
push ecx
lea edx, [esp + 0x1c]
push 4
push edx
push esi
mov dword [esp + 0x2c], 1
call edi
cmp dword [esp + 0x14], 0xf54dc871
jne 0x10005bc8
lea eax, [esp + 0x10]
push ebx
push eax
lea ecx, [esp + 0x1c]
push 4
push ecx
push esi
call edi
mov eax, dword [esp + 0x20]
and eax, 0xffff
lea edx, [eax + eax*8]
lea eax, [eax + edx*8]
lea ecx, [eax + eax*4]
mov eax, dword [esp + 0x22]
and eax, 0xffff
mov edx, eax
shl edx, 4
sub edx, eax
lea eax, [ecx + edx*2]
mov ecx, dword [esp + 0x26]
and ecx, 0xffff
add eax, ecx
mov ecx, dword [esp + 0x14]
lea eax, [eax + eax*2]
shl eax, 3
cmp ecx, eax
ja 0x10005b50
sub eax, ecx
cmp eax, 0x48
ja 0x10005bc8
lea edx, [esp + 0x10]
push ebx
push edx
lea eax, [esp + 0x24]
push 4
push eax
push esi
call edi
lea ecx, [esp + 0x10]
push ebx
push ecx
lea edx, [esp + 0x14c]
push 4
push edx
push esi
call edi
cmp dword [esp + 0x144], ebx
je 0x10005bc8
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, dword [esp + 0x144]
lea edx, [ecx + 0x10]
cmp edx, eax
ja 0x10005bc8
push ecx
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov ecx, dword [esp + 0x148]
add esp, 4
mov ebp, eax
lea eax, [esp + 0x10]
push ebx
push eax
push ecx
push ebp
push esi
call edi
mov edx, dword [esp + 0x144]
push edx
push ebp
call fcn.10007990
mov ecx, dword [esp + 0x24]
add esp, 8
cmp ecx, eax
je 0x10005bcc
mov dword [esp + 0x18], ebx
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [esp + 0x18]
cmp esi, ebx
jne 0x10005be8
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
jmp 0x10005bfe
mov ecx, dword [esp + 0x144]
push ecx
mov ecx, dword [esp + 0x34]
push ebp
push 4
push 0xffffffffffffffff
call fcn.10005520
cmp ebp, ebx
je 0x10005c0b
push ebp
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x12c
ret 8
lea edx, [esp + 0x38]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x12c
ret 8
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x12c
ret 8