Function at 0x405c00
Capabilities:
Create directory
Get file attributes
Set file attributes
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x40cf69
mov eax, dword fs:[0]
push eax
sub esp, 0x5bc
mov eax, dword [0x412020]
xor eax, esp
mov dword [esp + 0x5b8], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x412020]
xor eax, esp
push eax
lea eax, [esp + 0x5d0]
mov dword fs:[0], eax
mov edi, ecx
mov dword [esp + 0x38], edi
mov ebx, 1
mov dword [esp + 0x5d8], ebx
call fcn.00407090
mov dword [esp + 0x20], eax
mov byte [eax + 0x31], bl
mov eax, dword [esp + 0x20]
mov dword [eax + 4], eax
mov eax, dword [esp + 0x20]
mov dword [eax], eax
mov eax, dword [esp + 0x20]
mov dword [eax + 8], eax
xor eax, eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
push str.123456
lea ecx, [esp + 0xb4]
mov byte [esp + 0x5dc], 2
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
sub esp, 0x1c
mov bl, 3
mov byte [esp + 0x5f4], bl
lea eax, [esp + 0x5fc]
mov ecx, esp
mov dword [esp + 0x48], esp
push eax
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
sub esp, 0x1c
lea edx, [esp + 0x634]
mov ecx, esp
mov dword [esp + 0x60], esp
push edx
mov byte [esp + 0x614], 4
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
mov byte [esp + 0x610], bl
lea ebx, [esp + 0xcc]
call fcn.00407390
add esp, 0x38
push eax
lea ecx, [esp + 0x5e4]
mov byte [esp + 0x5dc], 5
call dword [sym.imp.MSVCP80.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__::operator_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
mov ecx, ebx
mov byte [esp + 0x5d8], 3
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
push 0x400
lea eax, [esp + 0x1d0]
push 0
push eax
call sub.MSVCR80.dll_memset
add esp, 0xc
push 0x100
lea ecx, [esp + 0xd0]
push 0
push ecx
call sub.MSVCR80.dll_memset
mov eax, dword [esp + 0x5f0]
mov esi, 0x10
add esp, 0xc
cmp dword [esp + 0x5f8], esi
jae 0x405d5a
lea eax, [esp + 0x5e4]
lea edx, [esp + 0x1cc]
sub edx, eax
mov cl, byte [eax]
mov byte [edx + eax], cl
add eax, 1
test cl, cl
jne 0x405d63
cmp dword [esp + 0xc8], esi
mov eax, dword [esp + 0xb4]
jae 0x405d86
lea eax, [esp + 0xb4]
lea edx, [esp + 0xcc]
sub edx, eax
nop
mov cl, byte [eax]
mov byte [edx + eax], cl
add eax, 1
test cl, cl
jne 0x405d90
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x1d0]
push eax
push edi
lea ecx, [esp + 0xd8]
call fcn.004061f0
lea ecx, [esp + 0x1c]
push ecx
mov ecx, dword [esp + 0x1c]
mov edx, eax
mov dword [esp + 0x18], eax
call fcn.00405a60
add esp, 4
cmp dword [esp + 0x24], 0
jne 0x405e31
lea ecx, [esp + 0xb0]
mov byte [esp + 0x5d8], 2
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
lea eax, [esp + 0x1c]
mov byte [esp + 0x5d8], 1
call fcn.00406790
lea ecx, [esp + 0x5e0]
mov byte [esp + 0x5d8], 0
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
lea ecx, [esp + 0x5fc]
mov dword [esp + 0x5d8], 0xffffffff
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
mov eax, 1
jmp 0x4061b4
lea ecx, [esp + 0x40]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_void_]
mov byte [esp + 0x5d8], 6
cmp dword [esp + 0x614], esi
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x600]
mov dword [esp + 0x2c], edx
mov dword [esp + 0x28], 0x32
jae 0x405e6a
lea eax, [esp + 0x600]
push eax
call dword [sym.imp.MSVCR80.dll__mkdir]
mov eax, dword [esp + 0x24]
mov ebp, dword [eax]
add esp, 4
mov dword [esp + 0x34], 0
cmp ebp, dword [esp + 0x20]
je 0x406137
lea eax, [ebp + 0xc]
push eax
lea ecx, [esp + 0x98]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
sub esp, 0x1c
mov byte [esp + 0x5f4], 7
lea edx, [esp + 0xb0]
mov ecx, esp
mov dword [esp + 0x4c], esp
push edx
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
lea edi, [esp + 0x78]
call fcn.00407510
add esp, 0x1c
mov bl, 8
xor esi, esi
mov byte [esp + 0x5d8], bl
cmp dword [esp + 0x70], esi
jbe 0x405f7e
mov eax, dword [esp + 0x60]
mov edi, 0x10
cmp dword [esp + 0x74], edi
jae 0x405ef0
lea eax, [esp + 0x60]
cmp byte [eax + esi], 0x5c
jne 0x405f6f
sub esp, 0x1c
mov eax, esp
mov dword [esp + 0x4c], esp
push esi
push 0
push eax
lea ecx, [esp + 0x84]
call dword [sym.imp.MSVCP80.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_]
sub esp, 0x1c
mov byte [esp + 0x610], 9
lea edx, [esp + 0x634]
mov ecx, esp
mov dword [esp + 0x74], esp
push edx
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
mov byte [esp + 0x610], bl
lea ebx, [esp + 0xb0]
call fcn.00407390
mov eax, dword [esp + 0xb4]
add esp, 0x38
cmp dword [esp + 0x90], edi
jae 0x405f59
lea eax, [esp + 0x7c]
push eax
call dword [sym.imp.MSVCR80.dll__mkdir]
add esp, 4
lea ecx, [esp + 0x78]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
mov bl, 8
add esi, 1
cmp esi, dword [esp + 0x70]
jb 0x405edd
jmp 0x405f83
mov edi, 0x10
sub esp, 0x1c
lea eax, [esp + 0x78]
mov ecx, esp
mov dword [esp + 0x58], esp
push eax
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
sub esp, 0x1c
mov byte [esp + 0x610], 0xa
lea edx, [esp + 0x634]
mov ecx, esp
mov dword [esp + 0x68], esp
push edx
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
mov byte [esp + 0x610], bl
lea ebx, [esp + 0xb0]
call fcn.00407390
add esp, 0x38
push eax
lea ecx, [esp + 0x44]
mov byte [esp + 0x5dc], 0xb
call dword [sym.imp.MSVCP80.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__::operator_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
mov ecx, ebx
mov byte [esp + 0x5d8], 8
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
cmp dword [esp + 0x58], edi
mov eax, dword [esp + 0x44]
jae 0x405ffd
lea eax, [esp + 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
test al, 1
je 0x406021
mov ecx, dword [esp + 0x44]
and eax, 0xfffffffe
cmp dword [esp + 0x58], edi
jae 0x406019
lea ecx, [esp + 0x44]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
cmp dword [esp + 0x58], edi
mov eax, dword [esp + 0x44]
jae 0x40602f
lea eax, [esp + 0x44]
push 0x40ede4
push eax
call dword [sym.imp.MSVCR80.dll_fopen]
mov esi, eax
add esp, 8
test esi, esi
je 0x4060b9
cmp ebp, dword [esp + 0x20]
jne 0x40605c
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
cmp ebp, dword [esp + 0x20]
jne 0x40605c
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov ecx, dword [ebp + 0x28]
mov eax, dword [ebp + 0x2c]
add ecx, dword [esp + 0x14]
push esi
push 1
push eax
push ecx
call dword [sym.imp.MSVCR80.dll_fwrite]
push esi
call dword [sym.imp.MSVCR80.dll_fclose]
mov ecx, dword [esp + 0x48]
mov eax, ecx
cdq
idiv dword [esp + 0x40]
add ecx, 0x32
add esp, 0x14
mov dword [esp + 0x34], ecx
mov esi, eax
add esi, 0x32
cmp esi, dword [esp + 0x28]
je 0x4060b9
mov edx, dword [esp + 0x38]
mov eax, dword [edx]
push esi
push 0
push 0x4e20
push eax
call dword [sym.imp.USER32.dll_PostMessageA]
push 0xa
mov dword [esp + 0x2c], esi
call dword [sym.imp.KERNEL32.dll_Sleep]
lea ecx, [esp + 0x5c]
mov byte [esp + 0x5d8], 7
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
lea ecx, [esp + 0x94]
mov byte [esp + 0x5d8], 6
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
cmp byte [ebp + 0x31], 0
je 0x4060f1
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
jmp 0x405e82
mov ecx, dword [ebp + 8]
cmp byte [ecx + 0x31], 0
jne 0x406113
mov eax, dword [ecx]
cmp byte [eax + 0x31], 0
jne 0x40610c
mov ecx, eax
mov eax, dword [ecx]
cmp byte [eax + 0x31], 0
je 0x406102
mov ebp, ecx
jmp 0x405e82
mov eax, dword [ebp + 4]
cmp byte [eax + 0x31], 0
jne 0x406130
lea esp, [esp]
cmp ebp, dword [eax + 8]
jne 0x406130
mov ebp, eax
mov eax, dword [eax + 4]
cmp byte [eax + 0x31], 0
je 0x406120
mov ebp, eax
jmp 0x405e82
mov ecx, dword [esp + 0x38]
mov edx, dword [ecx]
push 0x64
push 0
push 0x4e20
push edx
call dword [sym.imp.USER32.dll_PostMessageA]
lea ecx, [esp + 0x40]
mov byte [esp + 0x5d8], 3
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
lea ecx, [esp + 0xb0]
mov byte [esp + 0x5d8], 2
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
lea eax, [esp + 0x1c]
mov byte [esp + 0x5d8], 1
call fcn.00406790
lea ecx, [esp + 0x5e0]
mov byte [esp + 0x5d8], 0
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
lea ecx, [esp + 0x5fc]
mov dword [esp + 0x5d8], 0xffffffff
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
xor eax, eax
mov ecx, dword [esp + 0x5d0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x5b8]
xor ecx, esp
call fcn.0040bfb6
add esp, 0x5c8
ret 0x38