Function at 0x5d5860
Capabilities:
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x66c108
mov eax, dword fs:[0]
push eax
sub esp, 0x30
mov eax, dword [0x70903c]
xor eax, esp
mov dword [esp + 0x2c], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x70903c]
xor eax, esp
push eax
lea eax, [esp + 0x44]
mov dword fs:[0], eax
mov esi, dword [esp + 0x54]
mov eax, 0xffff
mov edx, ecx
mov dword [esp + 0x18], edx
cmp ax, si
jne 0x5d58ad
xor eax, eax
jmp 0x5d5c06
mov eax, dword [edx + 0x24]
mov ecx, dword [eax]
test ecx, ecx
je 0x5d58d9
mov eax, dword [edx + 0x34]
mov edi, dword [eax]
lea edi, [ecx + edi*2]
cmp ecx, edi
jae 0x5d58d9
dec dword [eax]
mov eax, dword [edx + 0x24]
mov ecx, dword [eax]
lea edx, [ecx + 2]
mov dword [eax], edx
mov word [ecx], si
mov ax, si
jmp 0x5d5c06
mov eax, dword [edx + 0x4c]
test eax, eax
je 0x5d5c01
cmp dword [edx + 0x3c], 0
jne 0x5d590c
push eax
push esi
call fcn.0061beed
mov ecx, 0xffff
add esp, 8
cmp ax, cx
movzx eax, si
jne 0x5d5c06
mov eax, ecx
jmp 0x5d5c06
movzx edx, si
mov ecx, 0xf
xor eax, eax
mov byte [esp + 0x28], 0
mov dword [esp + 0x14], edx
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x38], 8
cmp ecx, 0x10
jae 0x5d593c
lea eax, [esp + 0x28]
mov byte [eax + 8], 0
mov dword [esp + 0x4c], 0
mov eax, dword [esp + 0x28]
mov ebx, dword [esp + 0x38]
mov edx, dword [esp + 0x3c]
cmp edx, 0x10
jb 0x5d5b92
mov ebp, eax
test eax, eax
je 0x5d5983
mov ecx, eax
cmp edx, 0x10
jae 0x5d596e
lea ecx, [esp + 0x28]
cmp ecx, ebp
ja 0x5d5983
mov ecx, eax
cmp edx, 0x10
jae 0x5d597d
lea ecx, [esp + 0x28]
add ecx, ebx
cmp ebp, ecx
jbe 0x5d5994
call fcn.00615e0c
mov edx, dword [esp + 0x3c]
mov ebx, dword [esp + 0x38]
mov eax, dword [esp + 0x28]
lea ecx, [esp + 0x24]
cmp ecx, 0xfffffffc
je 0x5d59bf
mov ecx, eax
cmp edx, 0x10
jae 0x5d59a8
lea ecx, [esp + 0x28]
add ecx, ebx
cmp ebp, ecx
jb 0x5d59bf
call fcn.00615e0c
mov edx, dword [esp + 0x3c]
mov ebx, dword [esp + 0x38]
mov eax, dword [esp + 0x28]
mov edi, ebx
cmp edx, 0x10
jb 0x5d5b9b
mov esi, eax
test eax, eax
je 0x5d59f0
mov ecx, eax
cmp edx, 0x10
jae 0x5d59db
lea ecx, [esp + 0x28]
cmp ecx, esi
ja 0x5d59f0
mov ecx, eax
cmp edx, 0x10
jae 0x5d59ea
lea ecx, [esp + 0x28]
add ecx, ebx
cmp esi, ecx
jbe 0x5d5a01
call fcn.00615e0c
mov edx, dword [esp + 0x3c]
mov ebx, dword [esp + 0x38]
mov eax, dword [esp + 0x28]
lea ecx, [esp + 0x24]
cmp ecx, 0xfffffffc
je 0x5d5a1e
cmp edx, 0x10
jae 0x5d5a13
lea eax, [esp + 0x28]
add eax, ebx
cmp esi, eax
jb 0x5d5a1e
call fcn.00615e0c
mov ebx, dword [esp + 0x18]
mov ecx, dword [ebx + 0x3c]
mov edx, dword [ecx]
mov edx, dword [edx + 0x14]
lea eax, [esp + 0x1c]
push eax
add ebp, edi
push ebp
push esi
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0x26]
push eax
lea eax, [esp + 0x28]
push eax
lea eax, [ebx + 0x44]
push eax
call edx
test eax, eax
jl 0x5d5bf8
cmp eax, 1
jg 0x5d5bb6
mov edx, dword [esp + 0x3c]
mov eax, dword [esp + 0x28]
cmp edx, 0x10
jb 0x5d5ba4
mov esi, eax
test eax, eax
je 0x5d5a94
mov ecx, eax
cmp edx, 0x10
jae 0x5d5a7b
lea ecx, [esp + 0x28]
cmp ecx, esi
ja 0x5d5a94
mov ecx, eax
cmp edx, 0x10
jae 0x5d5a8a
lea ecx, [esp + 0x28]
mov ebx, dword [esp + 0x38]
add ecx, ebx
cmp esi, ecx
jbe 0x5d5aa5
call fcn.00615e0c
mov edx, dword [esp + 0x3c]
mov ebx, dword [esp + 0x38]
mov eax, dword [esp + 0x28]
lea ecx, [esp + 0x24]
cmp ecx, 0xfffffffc
je 0x5d5ad0
mov ecx, eax
cmp edx, 0x10
jae 0x5d5ab9
lea ecx, [esp + 0x28]
add ecx, ebx
cmp esi, ecx
jb 0x5d5ad0
call fcn.00615e0c
mov edx, dword [esp + 0x3c]
mov ebx, dword [esp + 0x38]
mov eax, dword [esp + 0x28]
mov edi, dword [esp + 0x1c]
sub edi, esi
je 0x5d5b61
cmp edx, 0x10
jb 0x5d5bad
mov esi, eax
test eax, eax
je 0x5d5b0b
mov ecx, eax
cmp edx, 0x10
jae 0x5d5af6
lea ecx, [esp + 0x28]
cmp ecx, esi
ja 0x5d5b0b
mov ecx, eax
cmp edx, 0x10
jae 0x5d5b05
lea ecx, [esp + 0x28]
add ecx, ebx
cmp esi, ecx
jbe 0x5d5b1c
call fcn.00615e0c
mov edx, dword [esp + 0x3c]
mov ebx, dword [esp + 0x38]
mov eax, dword [esp + 0x28]
lea ecx, [esp + 0x24]
cmp ecx, 0xfffffffc
je 0x5d5b39
cmp edx, 0x10
jae 0x5d5b2e
lea eax, [esp + 0x28]
add eax, ebx
cmp esi, eax
jb 0x5d5b39
call fcn.00615e0c
mov edx, dword [esp + 0x18]
mov eax, dword [edx + 0x4c]
push eax
push edi
push 1
push esi
call fcn.00618dcc
add esp, 0x10
cmp edi, eax
jne 0x5d5bf8
mov edx, dword [esp + 0x3c]
mov ebx, dword [esp + 0x38]
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x18]
mov byte [ecx + 0x42], 1
lea ecx, [esp + 0x14]
cmp dword [esp + 0x20], ecx
jne 0x5d5be8
test edi, edi
ja 0x5d5954
lea ecx, [esp + 0x24]
cmp ebx, 0x20
jae 0x5d5bfc
push 0
push 8
call fcn.00420820
jmp 0x5d5948
lea ebp, [esp + 0x28]
jmp 0x5d5963
lea esi, [esp + 0x28]
jmp 0x5d59d0
lea esi, [esp + 0x28]
jmp 0x5d5a70
lea esi, [esp + 0x28]
jmp 0x5d5aeb
cmp eax, 3
jne 0x5d5bf8
mov edx, dword [ebx + 0x4c]
mov eax, dword [esp + 0x14]
push edx
push eax
call fcn.005d5400
movzx esi, word [esp + 0x5c]
add esp, 8
test al, al
jne 0x5d5bda
mov esi, 0xffff
lea ecx, [esp + 0x24]
call fcn.005d2b30
mov ax, si
jmp 0x5d5c06
lea ecx, [esp + 0x24]
call fcn.005d2b30
mov ax, word [esp + 0x54]
jmp 0x5d5c06
lea ecx, [esp + 0x24]
call fcn.005d2b30
mov eax, 0xffff
mov ecx, dword [esp + 0x44]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x2c]
xor ecx, esp
call fcn.00613e6e
add esp, 0x3c
ret 4