Function at 0x53d920
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x59cb88
mov eax, dword fs:[0]
push eax
sub esp, 0x48
mov eax, dword [0x6336a0]
xor eax, esp
mov dword [esp + 0x40], eax
push ebx
push esi
push edi
mov eax, dword [0x6336a0]
xor eax, esp
push eax
lea eax, [esp + 0x58]
mov dword fs:[0], eax
mov ebx, dword [ebp + 8]
cmp ebx, 0xffffffff
mov edi, ecx
mov dword [esp + 0x18], edi
jne 0x53d96c
xor eax, eax
jmp 0x53dc9f
mov eax, dword [edi + 0x24]
mov ecx, dword [eax]
test ecx, ecx
je 0x53d996
mov eax, dword [edi + 0x34]
mov edx, dword [eax]
add edx, ecx
cmp ecx, edx
jae 0x53d996
add dword [eax], 0xffffffff
mov eax, dword [edi + 0x24]
mov ecx, dword [eax]
lea edx, [ecx + 1]
mov dword [eax], edx
mov byte [ecx], bl
mov eax, ebx
jmp 0x53dc9f
mov eax, dword [edi + 0x4c]
test eax, eax
je 0x53dc9c
cmp dword [edi + 0x3c], 0
jne 0x53d9c4
push eax
movsx eax, bl
push eax
call fcn.0057bdd8
add esp, 8
cmp eax, 0xffffffff
je 0x53dc9c
mov eax, ebx
jmp 0x53dc9f
lea esi, [esp + 0x34]
mov byte [esp + 0x17], bl
call fcn.0053e520
add edi, 0x44
mov dword [esp + 0x60], 0
mov dword [esp + 0x20], edi
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x4c]
jmp 0x53d9f0
cmp edx, 0x10
jb 0x53dbb1
test ecx, ecx
mov ebx, ecx
mov dword [esp + 0x1c], ebx
je 0x53da27
cmp edx, 0x10
mov eax, ecx
jae 0x53da0e
lea eax, [esp + 0x38]
cmp eax, ebx
ja 0x53da27
cmp edx, 0x10
mov eax, ecx
jae 0x53da1d
lea eax, [esp + 0x38]
mov esi, dword [esp + 0x48]
add eax, esi
cmp ebx, eax
jbe 0x53da34
call fcn.0057803b
mov edx, dword [esp + 0x4c]
mov ecx, dword [esp + 0x38]
lea eax, [esp + 0x34]
cmp eax, 0xfffffffe
je 0x53da5f
cmp edx, 0x10
mov eax, ecx
jae 0x53da48
lea eax, [esp + 0x38]
mov esi, dword [esp + 0x48]
add eax, esi
cmp ebx, eax
jb 0x53da5f
call fcn.0057803b
mov edx, dword [esp + 0x4c]
mov ecx, dword [esp + 0x38]
cmp edx, 0x10
mov esi, dword [esp + 0x48]
jb 0x53dbbe
test ecx, ecx
mov edi, ecx
je 0x53da9a
cmp edx, 0x10
mov eax, ecx
jae 0x53da7d
lea eax, [esp + 0x38]
cmp eax, edi
ja 0x53da9a
cmp edx, 0x10
mov eax, ecx
jae 0x53da8c
lea eax, [esp + 0x38]
mov ebx, dword [esp + 0x48]
add eax, ebx
cmp edi, eax
mov ebx, dword [esp + 0x1c]
jbe 0x53daa7
call fcn.0057803b
mov edx, dword [esp + 0x4c]
mov ecx, dword [esp + 0x38]
lea eax, [esp + 0x34]
cmp eax, 0xfffffffe
je 0x53daca
cmp edx, 0x10
mov eax, ecx
jae 0x53dabb
lea eax, [esp + 0x38]
mov ecx, dword [esp + 0x48]
add eax, ecx
cmp edi, eax
jb 0x53daca
call fcn.0057803b
mov edx, dword [esp + 0x18]
mov ecx, dword [edx + 0x3c]
mov eax, dword [ecx]
mov eax, dword [eax + 0x14]
lea edx, [esp + 0x28]
push edx
add ebx, esi
push ebx
push edi
lea edx, [esp + 0x30]
push edx
lea edx, [esp + 0x28]
push edx
lea edx, [esp + 0x2b]
push edx
mov edx, dword [esp + 0x38]
push edx
call eax
test eax, eax
jl 0x53dc8b
cmp eax, 1
jg 0x53dc3f
mov edx, dword [esp + 0x4c]
cmp edx, 0x10
mov ecx, dword [esp + 0x38]
jb 0x53dbc7
test ecx, ecx
mov edi, ecx
je 0x53db41
cmp edx, 0x10
mov eax, ecx
jae 0x53db28
lea eax, [esp + 0x38]
cmp eax, edi
ja 0x53db41
cmp edx, 0x10
mov eax, ecx
jae 0x53db37
lea eax, [esp + 0x38]
mov esi, dword [esp + 0x48]
add eax, esi
cmp edi, eax
jbe 0x53db4e
call fcn.0057803b
mov edx, dword [esp + 0x4c]
mov ecx, dword [esp + 0x38]
lea eax, [esp + 0x34]
cmp eax, 0xfffffffe
je 0x53db79
cmp edx, 0x10
mov eax, ecx
jae 0x53db62
lea eax, [esp + 0x38]
mov esi, dword [esp + 0x48]
add eax, esi
cmp edi, eax
jb 0x53db79
call fcn.0057803b
mov edx, dword [esp + 0x4c]
mov ecx, dword [esp + 0x38]
mov esi, dword [esp + 0x28]
sub esi, edi
je 0x53dc09
lea ebx, [esp + 0x2c]
lea edi, [esp + 0x34]
call fcn.0053e620
mov edi, eax
mov eax, dword [edi]
cmp eax, 0xfffffffe
je 0x53dbe2
test eax, eax
jne 0x53dba4
call fcn.0057803b
mov eax, dword [edi]
cmp dword [eax + 0x18], 0x10
jb 0x53dbd0
mov ecx, dword [eax + 4]
jmp 0x53dbd3
lea ebx, [esp + 0x38]
mov dword [esp + 0x1c], ebx
jmp 0x53da03
lea edi, [esp + 0x38]
jmp 0x53da72
lea edi, [esp + 0x38]
jmp 0x53db1d
lea ecx, [eax + 4]
mov edx, dword [eax + 0x14]
add edx, ecx
cmp dword [edi + 4], edx
jb 0x53dbe2
call fcn.0057803b
mov eax, dword [esp + 0x18]
mov ecx, dword [eax + 0x4c]
mov edi, dword [edi + 4]
push ecx
push esi
push 1
push edi
call fcn.0057a75f
add esp, 0x10
cmp esi, eax
jne 0x53dc8b
mov edx, dword [esp + 0x4c]
mov ecx, dword [esp + 0x38]
mov eax, dword [esp + 0x18]
mov byte [eax + 0x41], 1
lea eax, [esp + 0x17]
cmp dword [esp + 0x24], eax
jne 0x53dc75
test esi, esi
ja 0x53d9f0
cmp dword [esp + 0x48], 0x20
jae 0x53dc8b
push 0
mov eax, 8
lea edi, [esp + 0x38]
call fcn.0053e580
jmp 0x53d9e0
cmp eax, 3
jne 0x53dc8b
mov ecx, dword [esp + 0x18]
mov eax, dword [ecx + 0x4c]
mov cl, byte [esp + 0x17]
call fcn.00539d00
test al, al
je 0x53dc5d
mov esi, dword [ebp + 8]
jmp 0x53dc60
or esi, 0xffffffff
lea ecx, [esp + 0x34]
mov dword [esp + 0x60], 0xffffffff
call fcn.00433a50
mov eax, esi
jmp 0x53dc9f
lea ecx, [esp + 0x34]
mov dword [esp + 0x60], 0xffffffff
call fcn.00433a50
mov eax, dword [ebp + 8]
jmp 0x53dc9f
lea ecx, [esp + 0x34]
mov dword [esp + 0x60], 0xffffffff
call fcn.00433a50
or eax, 0xffffffff
mov ecx, dword [esp + 0x58]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x40]
xor ecx, esp
call fcn.00577139
mov esp, ebp
pop ebp
ret 4