Function at 0x10014220
Capabilities:
Resolve function by parsing pe exports
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x10020f12
mov eax, dword fs:[0]
push eax
sub esp, 0x80
mov eax, dword [0x1002e018]
xor eax, esp
mov dword [esp + 0x78], eax
push ebx
push esi
push edi
mov eax, dword [0x1002e018]
xor eax, esp
push eax
lea eax, [esp + 0x90]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
xor esi, esi
mov ebx, ecx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x1c], esi
cmp eax, 0xffffffff
jne 0x10014278
xor eax, eax
jmp 0x10014405
mov ecx, dword [ebx + 0x24]
cmp dword [ecx], esi
je 0x1001429f
mov edx, dword [ecx]
mov ecx, dword [ebx + 0x34]
mov edi, dword [ecx]
add edi, edx
cmp edx, edi
jae 0x1001429f
dec dword [ecx]
mov ebx, dword [ebx + 0x24]
mov ecx, dword [ebx]
lea edx, [ecx + 1]
mov dword [ebx], edx
mov byte [ecx], al
jmp 0x10014405
cmp dword [ebx + 0x54], esi
je 0x10014402
mov ecx, dword [ebx + 0x10]
mov ecx, dword [ecx]
lea edx, [ebx + 0x48]
cmp ecx, edx
jne 0x100142c8
mov eax, dword [ebx + 0x40]
push eax
push eax
mov eax, dword [ebx + 0x3c]
push eax
mov ecx, ebx
call dword [sym.imp.MSVCP100D.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::setg_char___char___char__]
mov eax, dword [ebp + 8]
cmp dword [ebx + 0x44], esi
jne 0x100142ef
mov ebx, dword [ebx + 0x54]
movsx ecx, al
push ebx
push ecx
call dword [sym.imp.MSVCR100D.dll_fputc]
add esp, 8
cmp eax, 0xffffffff
je 0x10014402
mov eax, dword [ebp + 8]
jmp 0x10014405
lea edx, [esp + 0x68]
push edx
mov byte [esp + 0x16], al
call fcn.100158f0
lea eax, [esp + 0x44]
push eax
lea ecx, [esp + 0x6c]
push ecx
mov dword [esp + 0xa0], esi
call fcn.10015850
mov esi, eax
lea edx, [esp + 0x38]
push edx
lea eax, [esp + 0x6c]
push eax
mov byte [esp + 0xa0], 1
call fcn.10015850
mov edi, eax
mov byte [esp + 0x98], 2
call fcn.100156c0
mov ecx, dword [esp + 0x7c]
mov esi, edi
mov dword [esp + 0x18], eax
mov dword [esp + 0x20], ecx
call fcn.100156c0
lea edx, [esp + 0x28]
push edx
mov edx, dword [esp + 0x24]
add edx, dword [esp + 0x1c]
lea ecx, [ebx + 0x4c]
push edx
push eax
lea eax, [esp + 0x38]
push eax
lea edx, [esp + 0x23]
push edx
lea eax, [esp + 0x26]
push eax
push ecx
mov ecx, dword [ebx + 0x44]
call dword [sym.imp.MSVCP100D.dll_public:_int___thiscall_std::codecvt_char__char__int_::out_int___char_const___char_const___char_const____char___char___char___const]
push 3
lea ecx, [esp + 0x28]
mov esi, eax
mov byte [esp + 0x9c], 1
call dword [sym.imp.MSVCP100D.dll_public:_void___thiscall_std::_Lockit::constructor_int_]
lea edi, [esp + 0x38]
mov byte [esp + 0x98], 3
call fcn.100037a0
lea ecx, [esp + 0x24]
mov byte [esp + 0x98], 1
call dword [sym.imp.MSVCP100D.dll_public:_void___thiscall_std::_Lockit::destructor_void_]
push 3
lea ecx, [esp + 0x1c]
mov byte [esp + 0x9c], 0
call dword [sym.imp.MSVCP100D.dll_public:_void___thiscall_std::_Lockit::constructor_int_]
lea edi, [esp + 0x44]
mov byte [esp + 0x98], 4
call fcn.100037a0
lea ecx, [esp + 0x18]
mov byte [esp + 0x98], 0
call dword [sym.imp.MSVCP100D.dll_public:_void___thiscall_std::_Lockit::destructor_void_]
test esi, esi
jns 0x10014434
lea eax, [esp + 0x68]
push eax
mov dword [esp + 0x9c], 0xffffffff
call fcn.10004bd0
or eax, 0xffffffff
mov ecx, dword [esp + 0x90]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x78]
xor ecx, esp
call fcn.1001ed20
mov esp, ebp
pop ebp
ret 4
mov ebx, dword [esp + 0x14]
cmp esi, 1
jg 0x100146a8
lea ecx, [esp + 0x50]
push ecx
lea edx, [esp + 0x6c]
push edx
call fcn.10015850
mov esi, eax
mov byte [esp + 0x98], 5
call fcn.100156c0
mov ebx, dword [esp + 0x28]
push 3
lea ecx, [esp + 0x34]
sub ebx, eax
mov byte [esp + 0x9c], 0
call dword [sym.imp.MSVCP100D.dll_public:_void___thiscall_std::_Lockit::constructor_int_]
lea edi, [esp + 0x50]
mov byte [esp + 0x98], 6
call fcn.100037a0
lea ecx, [esp + 0x30]
mov byte [esp + 0x98], 0
call dword [sym.imp.MSVCP100D.dll_public:_void___thiscall_std::_Lockit::destructor_void_]
test ebx, ebx
je 0x100144dd
lea eax, [esp + 0x5c]
push eax
lea ecx, [esp + 0x6c]
push ecx
call fcn.10015850
mov byte [esp + 0x98], 7
or dword [esp + 0x1c], 1
mov esi, eax
call fcn.100156c0
mov edx, dword [esp + 0x14]
mov ecx, dword [edx + 0x54]
push ecx
push ebx
push 1
push eax
call dword [sym.imp.MSVCR100D.dll_fwrite]
add esp, 0x10
mov byte [esp + 0x13], 1
cmp ebx, eax
jne 0x100144e2
mov byte [esp + 0x13], 0
mov dword [esp + 0x98], 0
test byte [esp + 0x1c], 1
je 0x10014528
and dword [esp + 0x1c], 0xfffffffe
push 3
lea ecx, [esp + 0x38]
call dword [sym.imp.MSVCP100D.dll_public:_void___thiscall_std::_Lockit::constructor_int_]
lea edi, [esp + 0x5c]
mov byte [esp + 0x98], 8
call fcn.100037a0
lea ecx, [esp + 0x34]
mov byte [esp + 0x98], 0
call dword [sym.imp.MSVCP100D.dll_public:_void___thiscall_std::_Lockit::destructor_void_]
cmp byte [esp + 0x13], 0
jne 0x100143ed
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x12]
mov byte [edx + 0x49], 1
cmp dword [esp + 0x2c], eax
jne 0x100146ed
test ebx, ebx
jne 0x100145b4
mov eax, dword [esp + 0x7c]
cmp eax, 0x20
jae 0x10014715
or ecx, 0xffffffff
sub ecx, eax
cmp ecx, 8
jbe 0x1001470a
lea esi, [eax + 8]
lea eax, [esp + 0x68]
call fcn.10004a60
test al, al
je 0x100145b4
mov ecx, dword [esp + 0x6c]
mov edx, 0x10
cmp dword [esp + 0x80], edx
jae 0x1001458e
lea ecx, [esp + 0x6c]
mov edi, dword [esp + 0x7c]
xor eax, eax
mov dword [ecx + edi], eax
mov dword [ecx + edi + 4], eax
mov eax, dword [esp + 0x6c]
mov dword [esp + 0x7c], esi
cmp dword [esp + 0x80], edx
jae 0x100145b0
lea eax, [esp + 0x6c]
mov byte [eax + esi], 0
lea edx, [esp + 0x44]
push edx
lea eax, [esp + 0x6c]
push eax
call fcn.10015850
mov esi, eax
lea ecx, [esp + 0x38]
push ecx
lea edx, [esp + 0x6c]
push edx
mov byte [esp + 0xa0], 1
call fcn.10015850
mov edi, eax
mov byte [esp + 0x98], 2
call fcn.100156c0
mov ebx, eax
mov eax, dword [esp + 0x7c]
mov esi, edi
mov dword [esp + 0x20], eax
call fcn.100156c0
mov edx, dword [esp + 0x20]
lea ecx, [esp + 0x28]
push ecx
add edx, ebx
push edx
push eax
lea eax, [esp + 0x38]
push eax
mov eax, dword [esp + 0x24]
lea ecx, [esp + 0x23]
push ecx
lea edx, [esp + 0x26]
add eax, 0x4c
push edx
push eax
mov eax, dword [esp + 0x30]
mov ecx, dword [eax + 0x44]
call dword [sym.imp.MSVCP100D.dll_public:_int___thiscall_std::codecvt_char__char__int_::out_int___char_const___char_const___char_const____char___char___char___const]
mov byte [esp + 0x98], 1
mov ebx, dword [sym.imp.MSVCP100D.dll_public:_void___thiscall_std::_Lockit::constructor_int_]
push 3
lea ecx, [esp + 0x28]
mov esi, eax
call ebx
lea edi, [esp + 0x38]
mov byte [esp + 0x98], 3
call fcn.100037a0
lea ecx, [esp + 0x24]
mov byte [esp + 0x98], 1
call dword [sym.imp.MSVCP100D.dll_public:_void___thiscall_std::_Lockit::destructor_void_]
push 3
lea ecx, [esp + 0x1c]
mov byte [esp + 0x9c], 0
call ebx
lea edi, [esp + 0x44]
mov byte [esp + 0x98], 4
call fcn.100037a0
lea ecx, [esp + 0x18]
mov byte [esp + 0x98], 0
call dword [sym.imp.MSVCP100D.dll_public:_void___thiscall_std::_Lockit::destructor_void_]
test esi, esi
jns 0x10014430
jmp 0x100143ed
cmp esi, 3
jne 0x100143ed
mov ebx, dword [ebx + 0x54]
movsx ecx, byte [esp + 0x12]
push ebx
push ecx
call dword [sym.imp.MSVCR100D.dll_fputc]
add esp, 8
cmp eax, 0xffffffff
je 0x100146ce
mov esi, dword [ebp + 8]
jmp 0x100146d1
or esi, 0xffffffff
lea edx, [esp + 0x68]
push edx
mov dword [esp + 0x9c], 0xffffffff
call fcn.10004bd0
mov eax, esi
jmp 0x10014405
lea ecx, [esp + 0x68]
push ecx
mov dword [esp + 0x9c], 0xffffffff
call fcn.10004bd0
mov eax, dword [ebp + 8]
jmp 0x10014405
push str.string_too_long
call dword [sym.imp.MSVCP100D.dll_void___cdecl_std::_Xlength_error_char_const__]
lea edx, [esp + 0x68]
push edx
jmp 0x100143f2