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

Disassembly:
push 0xffffffffffffffff
push 0x40b9d9
mov eax, dword fs:[0]
push eax
sub esp, 0x5bc
mov eax, dword [0x410020]
xor eax, esp
mov dword [esp + 0x5b8], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x410020]
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.004061a0
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.004064a0
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 0x404e6a
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 0x404e73
cmp dword [esp + 0xc8], esi
mov eax, dword [esp + 0xb4]
jae 0x404e96
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 0x404ea0
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x1d0]
push eax
push edi
lea ecx, [esp + 0xd8]
call fcn.00405300
lea ecx, [esp + 0x1c]
push ecx
mov ecx, dword [esp + 0x1c]
mov edx, eax
mov dword [esp + 0x18], eax
call fcn.00404b70
add esp, 4
cmp dword [esp + 0x24], 0
jne 0x404f41
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.004058a0
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 0x4052c4
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 0x404f7a
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 0x405247
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.00406620
add esp, 0x1c
mov bl, 8
xor esi, esi
mov byte [esp + 0x5d8], bl
cmp dword [esp + 0x70], esi
jbe 0x40508e
mov eax, dword [esp + 0x60]
mov edi, 0x10
cmp dword [esp + 0x74], edi
jae 0x405000
lea eax, [esp + 0x60]
cmp byte [eax + esi], 0x5c
jne 0x40507f
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.004064a0
mov eax, dword [esp + 0xb4]
add esp, 0x38
cmp dword [esp + 0x90], edi
jae 0x405069
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 0x404fed
jmp 0x405093
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.004064a0
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 0x40510d
lea eax, [esp + 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
test al, 1
je 0x405131
mov ecx, dword [esp + 0x44]
and eax, 0xfffffffe
cmp dword [esp + 0x58], edi
jae 0x405129
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 0x40513f
lea eax, [esp + 0x44]
push 0x40ca8c
push eax
call dword [sym.imp.MSVCR80.dll_fopen]
mov esi, eax
add esp, 8
test esi, esi
je 0x4051c9
cmp ebp, dword [esp + 0x20]
jne 0x40516c
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
cmp ebp, dword [esp + 0x20]
jne 0x40516c
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 0x4051c9
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 0x405201
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
jmp 0x404f92
mov ecx, dword [ebp + 8]
cmp byte [ecx + 0x31], 0
jne 0x405223
mov eax, dword [ecx]
cmp byte [eax + 0x31], 0
jne 0x40521c
mov ecx, eax
mov eax, dword [ecx]
cmp byte [eax + 0x31], 0
je 0x405212
mov ebp, ecx
jmp 0x404f92
mov eax, dword [ebp + 4]
cmp byte [eax + 0x31], 0
jne 0x405240
lea esp, [esp]
cmp ebp, dword [eax + 8]
jne 0x405240
mov ebp, eax
mov eax, dword [eax + 4]
cmp byte [eax + 0x31], 0
je 0x405230
mov ebp, eax
jmp 0x404f92
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.004058a0
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.0040aa90
add esp, 0x5c8
ret 0x38