Function at 0x402820
Capabilities:
Create thread
Get file size
Move file
Read file on windows
Set file attributes
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x4040c8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x50
push ebx
push ebp
push esi
push edi
mov ebp, dword [esp + 0x74]
mov esi, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
test ebp, ebp
mov dword [esp + 0x68], 0
je 0x402854
mov esi, ebp
mov al, byte [esp + 0x70]
push 0
lea ecx, [esp + 0x34]
mov byte [esp + 0x34], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push esi
lea ecx, [esp + 0x38]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_char_const___unsigned_int_]
mov ecx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
push 1
lea edx, [esp + 0x17]
mov byte [esp + 0x6c], 1
mov eax, dword [ecx]
lea ecx, [esp + 0x34]
push eax
push edx
mov byte [esp + 0x1f], 0x2e
call dword [sym.imp.MSVCP60.dll_public:_unsigned_int___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::rfind_char_const___unsigned_int__unsigned_int_const]
mov esi, eax
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
push 1
lea ecx, [esp + 0x17]
mov eax, dword [eax]
mov bl, 0x5c
push eax
push ecx
lea ecx, [esp + 0x3c]
mov byte [esp + 0x1f], bl
call dword [sym.imp.MSVCP60.dll_public:_unsigned_int___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::rfind_char_const___unsigned_int__unsigned_int_const]
sub esi, eax
lea edx, [esp + 0x40]
dec esi
inc eax
push esi
push eax
push edx
lea ecx, [esp + 0x3c]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::substr_unsigned_int__unsigned_int_]
mov ecx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov byte [esp + 0x68], 2
mov edx, dword [ecx]
lea ecx, [esp + 0x30]
push edx
push 0
push eax
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___unsigned_int__unsigned_int_]
push 1
lea ecx, [esp + 0x44]
mov byte [esp + 0x6c], 1
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov esi, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
test ebp, ebp
je 0x402912
mov esi, ebp
mov al, byte [esp + 0x70]
push 0
lea ecx, [esp + 0x24]
mov byte [esp + 0x24], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push esi
lea ecx, [esp + 0x28]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_char_const___unsigned_int_]
mov ecx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
push 1
lea edx, [esp + 0x17]
mov byte [esp + 0x6c], 3
mov eax, dword [ecx]
lea ecx, [esp + 0x24]
push eax
push edx
mov byte [esp + 0x1f], bl
call dword [sym.imp.MSVCP60.dll_public:_unsigned_int___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::rfind_char_const___unsigned_int__unsigned_int_const]
mov ecx, dword [esp + 0x28]
lea edi, [eax + 1]
mov esi, ecx
sub esi, eax
cmp ecx, edi
jae 0x402976
call dword [sym.imp.MSVCP60.dll_void___cdecl_std::_Xran_void_]
lea ecx, [esp + 0x20]
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Split_void_]
mov eax, dword [esp + 0x28]
sub eax, edi
cmp eax, esi
jae 0x40298c
mov esi, eax
test esi, esi
jbe 0x4029ca
mov ecx, dword [esp + 0x24]
sub eax, esi
add ecx, edi
push eax
lea edx, [ecx + esi]
push edx
push ecx
call dword [sym.imp.MSVCRT.dll_memmove]
mov edi, dword [esp + 0x34]
add esp, 0xc
sub edi, esi
lea ecx, [esp + 0x20]
push 0
push edi
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x4029ca
mov edx, dword [esp + 0x24]
mov dword [esp + 0x28], edi
mov byte [edx + edi], 0
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
test ebp, ebp
je 0x4029d5
mov eax, ebp
push 0
push 0x80
push 4
push 0
push 1
push closesocket
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
lea eax, [esp + 0x1c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push 0x8e00
mov edi, eax
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
lea ecx, [esp + 0x14]
mov ebp, eax
push 0
push ecx
push 0x8e00
push ebp
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
add edi, 0xffff7200
push edi
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
lea edx, [esp + 0x14]
mov ebx, eax
push 0
push edx
push edi
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
lea eax, [esp + 0x30]
lea ecx, [esp + 0x20]
push eax
lea edx, [esp + 0x54]
push ecx
push edx
call sub.MSVCP60.dll_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____cdecl_std::operator_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__
push 0x4057f4
push eax
lea eax, [esp + 0x54]
mov byte [esp + 0x7c], 4
push eax
call sub.MSVCP60.dll_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____cdecl_std::operator_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___char_const__
add esp, 0x18
mov ecx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov byte [esp + 0x68], 5
mov edx, dword [ecx]
mov ecx, 0x405b78
push edx
push 0
push eax
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___unsigned_int__unsigned_int_]
push 1
lea ecx, [esp + 0x44]
mov byte [esp + 0x6c], 4
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
push 1
lea ecx, [esp + 0x54]
mov byte [esp + 0x6c], 3
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
lea eax, [esp + 0x30]
lea ecx, [esp + 0x20]
push eax
lea edx, [esp + 0x44]
push ecx
push edx
call sub.MSVCP60.dll_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____cdecl_std::operator_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__
mov byte [esp + 0x74], 6
push 0x4057fc
push eax
lea eax, [esp + 0x64]
push eax
call sub.MSVCP60.dll_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____cdecl_std::operator_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___char_const__
add esp, 0x18
mov ecx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov byte [esp + 0x68], 7
mov edx, dword [ecx]
mov ecx, 0x405b68
push edx
push 0
push eax
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___unsigned_int__unsigned_int_]
push 1
lea ecx, [esp + 0x54]
mov byte [esp + 0x6c], 6
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
push 1
lea ecx, [esp + 0x44]
mov byte [esp + 0x6c], 3
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov eax, dword [0x405bcc]
test eax, eax
jne 0x402b2d
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
push 0
push 6
push 4
push 0
push 1
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
lea ecx, [esp + 0x14]
push 0
push ecx
push 0x8e00
push ebp
push eax
mov dword [esp + 0x2c], eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, dword [esp + 0x18]
push edx
call esi
mov eax, dword [0x405b7c]
test eax, eax
jne 0x402b70
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
push 0
push 6
push 4
push 0
push 1
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
lea ecx, [esp + 0x14]
push 0
push ecx
push edi
push ebx
push eax
mov dword [esp + 0x2c], eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, dword [esp + 0x18]
push edx
call esi
push ebp
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
push ebx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 8
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [0x405b6c]
mov edx, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
xor ebx, ebx
cmp eax, ebx
jne 0x402bcb
mov eax, edx
mov ecx, dword [0x405b8c]
cmp ecx, ebx
jne 0x402bd7
mov ecx, edx
mov edi, dword [sym.imp.MSVCRT.dll_rename]
push eax
push ecx
call edi
mov eax, dword [0x405b6c]
add esp, 8
cmp eax, ebx
jne 0x402bf2
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
mov esi, dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push 6
push eax
call esi
mov ecx, dword [0x405b8c]
mov edx, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
cmp ecx, ebx
jne 0x402c0f
mov ecx, edx
mov eax, dword [0x405b7c]
cmp eax, ebx
jne 0x402c1a
mov eax, edx
push ecx
push eax
call edi
mov eax, dword [0x405b8c]
add esp, 8
cmp eax, ebx
jne 0x402c2f
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
push 0x80
push eax
call esi
push ebx
push ebx
push 0x401c10
call dword [sym.imp.MSVCRT.dll__beginthread]
mov ecx, dword [esp + 0x30]
add esp, 0xc
cmp ecx, ebx
je 0x402c6b
mov al, byte [ecx - 1]
test al, al
je 0x402c61
cmp al, 0xff
je 0x402c61
dec al
mov byte [ecx - 1], al
jmp 0x402c6b
dec ecx
push ecx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
mov ecx, dword [esp + 0x34]
mov dword [esp + 0x24], ebx
cmp ecx, ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], ebx
je 0x402c9b
mov al, byte [ecx - 1]
test al, al
je 0x402c91
cmp al, 0xff
je 0x402c91
dec al
mov byte [ecx - 1], al
jmp 0x402c9b
dec ecx
push ecx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
mov ecx, dword [esp + 0x74]
pop edi
pop esi
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], ebx
pop ebp
cmp ecx, ebx
pop ebx
je 0x402cdc
mov al, byte [ecx - 1]
test al, al
je 0x402cd2
cmp al, 0xff
je 0x402cd2
dec al
mov byte [ecx - 1], al
mov ecx, dword [esp + 0x50]
mov dword fs:[0], ecx
add esp, 0x5c
ret
dec ecx
push ecx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
mov ecx, dword [esp + 0x50]
mov dword fs:[0], ecx
add esp, 0x5c
ret