Function at 0x41b030
Capabilities:
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x571898
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
mov eax, dword [0x59ad00]
xor eax, esp
mov dword [esp + 0x28], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x59ad00]
xor eax, esp
push eax
lea eax, [esp + 0x40]
mov dword fs:[0], eax
mov ebx, dword [esp + 0x50]
mov edi, ecx
cmp ebx, 0xffffffff
jne 0x41b074
xor eax, eax
jmp 0x41b22c
mov eax, dword [edi + 0x24]
mov ecx, dword [eax]
test ecx, ecx
je 0x41b09d
mov eax, dword [edi + 0x34]
mov edx, dword [eax]
add edx, ecx
cmp ecx, edx
jae 0x41b09d
dec dword [eax]
mov edi, dword [edi + 0x24]
mov eax, dword [edi]
lea ecx, [eax + 1]
mov dword [edi], ecx
mov byte [eax], bl
mov eax, ebx
jmp 0x41b22c
cmp dword [edi + 0x54], 0
je 0x41b229
mov edx, dword [edi + 0x10]
lea ecx, [edi + 0x48]
cmp dword [edx], ecx
jne 0x41b0c2
mov eax, dword [edi + 0x40]
mov edx, dword [edi + 0x3c]
push eax
push eax
push edx
mov ecx, edi
call dword [sym.imp.MSVCP100.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::setg_char___char___char__]
cmp dword [edi + 0x44], 0
jne 0x41b0e9
mov edi, dword [edi + 0x54]
movsx eax, bl
push edi
push eax
call dword [sym.imp.MSVCR100.dll_fputc]
add esp, 8
cmp eax, 0xffffffff
je 0x41b229
mov eax, ebx
jmp 0x41b22c
mov ecx, 0xf
xor eax, eax
mov byte [esp + 0x20], 0
mov byte [esp + 0x14], bl
mov dword [esp + 0x34], ecx
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x30], 8
cmp ecx, 0x10
jae 0x41b116
lea eax, [esp + 0x20]
mov byte [eax + 8], 0
mov dword [esp + 0x48], 0
lea ebp, [edi + 0x4c]
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x34]
mov ecx, eax
cmp edx, 0x10
jae 0x41b13a
lea ecx, [esp + 0x20]
mov eax, ecx
add ecx, dword [esp + 0x30]
lea edx, [esp + 0x18]
push edx
push ecx
push eax
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x25]
push ecx
mov ecx, dword [edi + 0x44]
lea edx, [esp + 0x28]
push edx
push ebp
call dword [sym.imp.MSVCP100.dll_public:_int___thiscall_std::codecvt_char__char__int_::out_int___char_const___char_const___char_const____char___char___char___const]
test eax, eax
js 0x41b220
cmp eax, 1
jg 0x41b1da
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x20]
mov ecx, eax
cmp edx, 0x10
jae 0x41b17e
lea ecx, [esp + 0x20]
mov esi, dword [esp + 0x18]
sub esi, ecx
je 0x41b1ac
cmp edx, 0x10
jae 0x41b18f
lea eax, [esp + 0x20]
mov ecx, dword [edi + 0x54]
push ecx
push esi
push 1
push eax
call dword [sym.imp.MSVCR100.dll_fwrite]
add esp, 0x10
cmp esi, eax
jne 0x41b220
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x20]
lea ecx, [esp + 0x14]
mov byte [edi + 0x49], 1
cmp dword [esp + 0x1c], ecx
jne 0x41b213
test esi, esi
jne 0x41b12d
cmp dword [esp + 0x30], 0x20
lea ecx, [esp + 0x20]
jae 0x41b224
push esi
push 8
call fcn.0041a800
jmp 0x41b125
cmp eax, 3
jne 0x41b220
mov edx, dword [edi + 0x54]
mov eax, dword [esp + 0x14]
push edx
push eax
call fcn.004188d0
add esp, 8
test al, al
je 0x41b203
lea ecx, [esp + 0x20]
mov esi, ebx
call fcn.00419f70
mov eax, esi
jmp 0x41b22c
lea ecx, [esp + 0x20]
or esi, 0xffffffff
call fcn.00419f70
mov eax, esi
jmp 0x41b22c
lea ecx, [esp + 0x20]
call fcn.00419f70
mov eax, ebx
jmp 0x41b22c
lea ecx, [esp + 0x20]
call fcn.00419f70
or eax, 0xffffffff
mov ecx, dword [esp + 0x40]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x28]
xor ecx, esp
call fcn.00551a8e
add esp, 0x38
ret 4