Function at 0x6d5b4c00
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x2c
mov eax, dword [0x6d5e2a5c]
xor eax, esp
mov dword [esp + 0x28], eax
push ebx
mov ebx, dword [esp + 0x34]
push esi
mov esi, ecx
cmp ebx, 0xffffffff
jne 0x6d5b4c30
pop esi
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x28]
xor ecx, esp
call fcn.6d5ca6ac
add esp, 0x2c
ret 4
mov ecx, dword [esi + 0x24]
cmp dword [ecx], 0
je 0x6d5b4c68
mov eax, dword [esi + 0x34]
mov ecx, dword [ecx]
mov edx, dword [eax]
add edx, ecx
cmp ecx, edx
jae 0x6d5b4c68
dec dword [eax]
mov esi, dword [esi + 0x24]
mov eax, dword [esi]
lea ecx, [eax + 1]
mov dword [esi], ecx
mov byte [eax], bl
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [esp + 0x28]
xor ecx, esp
call fcn.6d5ca6ac
add esp, 0x2c
ret 4
cmp dword [esi + 0x54], 0
jne 0x6d5b4c84
pop esi
or eax, 0xffffffff
pop ebx
mov ecx, dword [esp + 0x28]
xor ecx, esp
call fcn.6d5ca6ac
add esp, 0x2c
ret 4
mov ecx, dword [esi + 0x10]
lea edx, [esi + 0x48]
cmp dword [ecx], edx
jne 0x6d5b4ca2
mov edx, dword [esi + 0x3c]
mov eax, dword [esi + 0x40]
mov dword [ecx], edx
mov ecx, dword [esi + 0x20]
mov dword [ecx], eax
mov edx, dword [esi + 0x30]
sub eax, eax
mov dword [edx], eax
cmp dword [esi + 0x44], 0
jne 0x6d5b4cd3
mov esi, dword [esi + 0x54]
movsx eax, bl
push esi
push eax
call dword [sym.imp.MSVCR100.dll_fputc]
add esp, 8
cmp eax, 0xffffffff
je 0x6d5b4c6e
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [esp + 0x28]
xor ecx, esp
call fcn.6d5ca6ac
add esp, 0x2c
ret 4
mov ecx, 0xf
xor eax, eax
mov byte [esp + 0x14], 0
mov byte [esp + 8], bl
mov dword [esp + 0x28], ecx
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x24], 8
cmp ecx, 0x10
jae 0x6d5b4d00
lea eax, [esp + 0x14]
push ebp
mov byte [eax + 8], 0
lea ebx, [esi + 0x4c]
push edi
mov eax, dword [esp + 0x1c]
mov ebp, dword [esp + 0x30]
mov edx, eax
cmp ebp, 0x10
jae 0x6d5b4d1e
lea edx, [esp + 0x1c]
mov eax, edx
add edx, dword [esp + 0x2c]
mov ecx, dword [esi + 0x44]
mov edi, dword [ecx]
lea ebp, [esp + 0x14]
push ebp
push edx
push eax
lea edx, [esp + 0x24]
push edx
lea eax, [esp + 0x21]
push eax
mov eax, dword [edi + 0x14]
lea edx, [esp + 0x24]
push edx
push ebx
call eax
test eax, eax
js 0x6d5b4e4e
cmp eax, 1
jg 0x6d5b4dcb
mov ebp, dword [esp + 0x30]
mov eax, dword [esp + 0x1c]
mov ecx, eax
cmp ebp, 0x10
jae 0x6d5b4d63
lea ecx, [esp + 0x1c]
mov edi, dword [esp + 0x14]
sub edi, ecx
je 0x6d5b4d95
cmp ebp, 0x10
jae 0x6d5b4d74
lea eax, [esp + 0x1c]
mov ecx, dword [esi + 0x54]
push ecx
push edi
push 1
push eax
call dword [sym.imp.MSVCR100.dll_fwrite]
add esp, 0x10
cmp edi, eax
jne 0x6d5b4e4e
mov ebp, dword [esp + 0x30]
mov eax, dword [esp + 0x1c]
lea edx, [esp + 0x10]
mov byte [esi + 0x49], 1
cmp dword [esp + 0x18], edx
jne 0x6d5b4e2c
test edi, edi
jne 0x6d5b4d11
cmp dword [esp + 0x2c], 0x20
lea ecx, [esp + 0x1c]
jae 0x6d5b4e52
push edi
push 8
call fcn.6d5a7b10
jmp 0x6d5b4d09
cmp eax, 3
jne 0x6d5b4e4e
mov eax, dword [esi + 0x54]
mov ecx, dword [esp + 0x10]
push eax
push ecx
call fcn.6d5a7500
add esp, 8
test al, al
je 0x6d5b4e09
mov esi, dword [esp + 0x40]
lea ecx, [esp + 0x1c]
call fcn.6d5a72f0
pop edi
pop ebp
mov eax, esi
pop esi
pop ebx
mov ecx, dword [esp + 0x28]
xor ecx, esp
call fcn.6d5ca6ac
add esp, 0x2c
ret 4
lea ecx, [esp + 0x1c]
or esi, 0xffffffff
call fcn.6d5a72f0
pop edi
pop ebp
mov eax, esi
pop esi
pop ebx
mov ecx, dword [esp + 0x28]
xor ecx, esp
call fcn.6d5ca6ac
add esp, 0x2c
ret 4
lea ecx, [esp + 0x1c]
call fcn.6d5a72f0
mov eax, dword [esp + 0x40]
pop edi
pop ebp
pop esi
pop ebx
mov ecx, dword [esp + 0x28]
xor ecx, esp
call fcn.6d5ca6ac
add esp, 0x2c
ret 4
lea ecx, [esp + 0x1c]
call fcn.6d5a72f0
mov ecx, dword [esp + 0x38]
pop edi
pop ebp
pop esi
pop ebx
xor ecx, esp
or eax, 0xffffffff
call fcn.6d5ca6ac
add esp, 0x2c
ret 4