Function at 0x6156a0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x6482e8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x30
push ebx
mov ebx, dword [ebp + 8]
mov edx, ecx
mov dword [ebp - 0x10], edx
cmp ebx, 0xffffffff
jne 0x6156dc
xor eax, eax
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 4
mov eax, dword [edx + 0x24]
mov ecx, dword [eax]
push esi
test ecx, ecx
je 0x615713
mov eax, dword [edx + 0x34]
mov esi, dword [eax]
add esi, ecx
cmp ecx, esi
jae 0x615713
dec dword [eax]
mov eax, dword [edx + 0x24]
mov ecx, dword [eax]
lea edx, [ecx + 1]
mov dword [eax], edx
mov byte [ecx], bl
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 4
mov eax, dword [edx + 0x4c]
test eax, eax
je 0x615732
cmp dword [edx + 0x3c], 0
jne 0x615747
push eax
movsx eax, bl
push eax
call fcn.005f9573
add esp, 8
cmp eax, 0xffffffff
jne 0x6156ff
pop esi
or eax, 0xffffffff
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 4
mov ecx, 0xf
xor eax, eax
mov byte [ebp - 0x38], 0
mov byte [ebp - 0x14], bl
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x28], 8
cmp ecx, 0x10
jae 0x61576d
lea eax, [ebp - 0x38]
mov byte [eax + 8], 0
mov dword [ebp - 4], 0
push edi
mov eax, dword [ebp - 0x38]
mov edx, dword [ebp - 0x24]
nop
cmp edx, 0x10
jb 0x61599a
mov ebx, eax
mov dword [ebp - 0x18], ebx
test eax, eax
je 0x6157b3
mov ecx, eax
cmp edx, 0x10
jae 0x61579c
lea ecx, [ebp - 0x38]
cmp ecx, ebx
ja 0x6157b3
mov ecx, eax
cmp edx, 0x10
jae 0x6157aa
lea ecx, [ebp - 0x38]
mov esi, dword [ebp - 0x28]
add ecx, esi
cmp ebx, ecx
jbe 0x6157be
call fcn.005f3d73
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x38]
lea ecx, [ebp - 0x3c]
cmp ecx, 0xfffffffc
je 0x6157e4
mov ecx, eax
cmp edx, 0x10
jae 0x6157d0
lea ecx, [ebp - 0x38]
mov esi, dword [ebp - 0x28]
add ecx, esi
cmp ebx, ecx
jb 0x6157e4
call fcn.005f3d73
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x38]
mov edi, dword [ebp - 0x28]
cmp edx, 0x10
jb 0x6159a5
mov esi, eax
test eax, eax
je 0x61581a
mov ecx, eax
cmp edx, 0x10
jae 0x615800
lea ecx, [ebp - 0x38]
cmp ecx, esi
ja 0x61581a
mov ecx, eax
cmp edx, 0x10
jae 0x61580e
lea ecx, [ebp - 0x38]
mov ebx, dword [ebp - 0x28]
add ecx, ebx
mov ebx, dword [ebp - 0x18]
cmp esi, ecx
jbe 0x615825
call fcn.005f3d73
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x38]
lea ecx, [ebp - 0x3c]
cmp ecx, 0xfffffffc
je 0x615843
cmp edx, 0x10
jae 0x615835
lea eax, [ebp - 0x38]
mov edx, dword [ebp - 0x28]
add eax, edx
cmp esi, eax
jb 0x615843
call fcn.005f3d73
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0x3c]
mov edx, dword [ecx]
mov edx, dword [edx + 0x14]
lea eax, [ebp - 0x1c]
push eax
add ebx, edi
push ebx
push esi
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x13]
push eax
lea eax, [ebp - 0x14]
push eax
mov eax, dword [ebp - 0x10]
add eax, 0x44
push eax
call edx
test eax, eax
jl 0x615a37
cmp eax, 1
jg 0x6159bd
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x38]
cmp edx, 0x10
jb 0x6159ad
mov esi, eax
test eax, eax
je 0x6158b2
mov ecx, eax
cmp edx, 0x10
jae 0x61589b
lea ecx, [ebp - 0x38]
cmp ecx, esi
ja 0x6158b2
mov ecx, eax
cmp edx, 0x10
jae 0x6158a9
lea ecx, [ebp - 0x38]
mov edi, dword [ebp - 0x28]
add ecx, edi
cmp esi, ecx
jbe 0x6158bd
call fcn.005f3d73
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x38]
lea ecx, [ebp - 0x3c]
cmp ecx, 0xfffffffc
je 0x6158e3
mov ecx, eax
cmp edx, 0x10
jae 0x6158cf
lea ecx, [ebp - 0x38]
mov edi, dword [ebp - 0x28]
add ecx, edi
cmp esi, ecx
jb 0x6158e3
call fcn.005f3d73
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x38]
mov edi, dword [ebp - 0x1c]
sub edi, esi
je 0x615964
cmp edx, 0x10
jb 0x6159b5
mov esi, eax
test eax, eax
je 0x61591a
mov ecx, eax
cmp edx, 0x10
jae 0x615903
lea ecx, [ebp - 0x38]
cmp ecx, esi
ja 0x61591a
mov ecx, eax
cmp edx, 0x10
jae 0x615911
lea ecx, [ebp - 0x38]
mov ebx, dword [ebp - 0x28]
add ecx, ebx
cmp esi, ecx
jbe 0x615925
call fcn.005f3d73
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x38]
lea ecx, [ebp - 0x3c]
cmp ecx, 0xfffffffc
je 0x615943
cmp edx, 0x10
jae 0x615935
lea eax, [ebp - 0x38]
mov edx, dword [ebp - 0x28]
add eax, edx
cmp esi, eax
jb 0x615943
call fcn.005f3d73
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0x4c]
push ecx
push edi
push 1
push esi
call fcn.005f43d6
add esp, 0x10
cmp edi, eax
jne 0x615a37
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x38]
mov ecx, dword [ebp - 0x10]
mov byte [ecx + 0x41], 1
lea ecx, [ebp - 0x14]
cmp dword [ebp - 0x20], ecx
jne 0x615a19
test edi, edi
ja 0x615780
cmp dword [ebp - 0x28], 0x20
lea ecx, [ebp - 0x3c]
jae 0x615a3a
push 0
push 8
call fcn.0041e190
jmp 0x615779
lea ebx, [ebp - 0x38]
mov dword [ebp - 0x18], ebx
jmp 0x615792
lea esi, [ebp - 0x38]
jmp 0x6157f6
lea esi, [ebp - 0x38]
jmp 0x615891
lea esi, [ebp - 0x38]
jmp 0x6158f9
cmp eax, 3
jne 0x615a37
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 0x4c]
mov ecx, dword [ebp - 0x14]
push eax
push ecx
call fcn.00614eb0
add esp, 8
test al, al
je 0x6159f9
mov esi, dword [ebp + 8]
lea ecx, [ebp - 0x3c]
call fcn.00415260
pop edi
mov eax, esi
pop esi
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 4
lea ecx, [ebp - 0x3c]
or esi, 0xffffffff
call fcn.00415260
pop edi
mov eax, esi
pop esi
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 4
lea ecx, [ebp - 0x3c]
call fcn.00415260
mov eax, dword [ebp + 8]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 4
lea ecx, [ebp - 0x3c]
call fcn.00415260
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 4