Function at 0x5ed604
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc4
mov eax, dword [0x10042408]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, ecx
mov ecx, dword [ebp + 0xc]
push edi
mov edi, edx
mov dword [ebp - 0xc0], ebx
mov eax, dword [esi + 0x20]
or eax, dword [esi + 0x24]
mov edx, dword [0x100370a4]
mov dword [ebp - 0xac], edi
mov dword [ebp - 0xb8], esi
mov dword [ebp - 0xbc], ecx
mov dword [ebp - 0xb0], 0
jne 0x5ed6be
mov eax, dword [esi + 0x28]
or eax, dword [esi + 0x2c]
jne 0x5ed6be
call edx
mov ecx, eax
mov eax, 0x10624dd3
mul ecx
shr edx, 6
imul eax, edx, 0x3e8
sub ecx, eax
imul eax, ecx, 0x3e8
mov ecx, dword [ebx + 0x50c]
sub eax, ecx
movd xmm1, eax
cvtdq2pd xmm1, xmm1
divsd xmm1, qword [0x100405d8]
cmp edx, dword [ebx + 0x508]
je 0x5ed6aa
sub edx, dword [ebx + 0x508]
movd xmm0, edx
cvtdq2pd xmm0, xmm0
addsd xmm1, xmm0
mov ecx, dword [ebp - 0xbc]
mov edx, dword [0x100370a4]
movsd qword [ebx + 0x4f0], xmm1
or dword [ecx], 2
cmp dword [ebx + 0x110], 0
jne 0x5ed8e3
mov eax, dword [esi + 0xa0]
mov dword [ebx + 0x114], eax
cmp dword [esi + 0xac], 0
jne 0x5ed898
cmp dword [esi + 0x84], 2
jne 0x5ed760
mov ecx, dword [ebx + 0x86bc]
cmp dword [ecx + 0x58], 2
jne 0x5ed760
and dword [esi + 0xa8], 0xfffffffd
mov dword [esi + 0x84], 1
call edx
mov ecx, dword [ebp - 0xb8]
mov edi, eax
mov eax, 0x10624dd3
mul edi
shr edx, 6
imul esi, edx, 0x3e8
mov dword [ecx + 0x7c], edx
mov edx, 0x3e8
sub edi, esi
imul eax, edi, 0x3e8
mov dword [ecx + 0x80], eax
mov ecx, ebx
mov eax, dword [ebp - 0xbc]
and dword [eax], 0xfffffffd
call fcn.005e7354
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005f4f86
mov esp, ebp
pop ebp
ret
mov eax, dword [edi + 0x218]
test dword [eax + 0x3c], 0x40001
je 0x5ed784
mov eax, dword [ebx + 0x86bc]
xor ecx, ecx
cmp dword [eax + 0x58], 1
sete cl
mov dword [ebp - 0xb0], ecx
lea eax, [ebp - 0xb8]
mov ecx, edi
push eax
call fcn.005ec924
add esp, 4
test eax, eax
jne 0x5edaef
mov edi, dword [ebp - 0xb8]
test edi, edi
je 0x5ed898
jle 0x5ed8a5
mov dword [ebx + 0x110], edi
cmp dword [ebp - 0xb0], eax
jne 0x5ed8dd
cmp dword [ebx + 0x224], eax
je 0x5ed8dd
cmp dword [ebx + 0x85c4], eax
jne 0x5ed813
push 0x8000
call dword [0x10043430]
add esp, 4
mov dword [ebx + 0x85c4], eax
test eax, eax
jne 0x5ed813
push 0x1003fd54
push ebx
call fcn.005ea214
add esp, 8
mov eax, 0x1b
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005f4f86
mov esp, ebp
pop ebp
ret
xor ecx, ecx
xor edx, edx
test edi, edi
jle 0x5ed87a
jmp 0x5ed824
mov eax, dword [ebx + 0x114]
mov al, byte [edx + eax]
mov byte [ebp - 0xb1], al
cmp al, 0xa
mov eax, dword [ebx + 0x85c4]
jne 0x5ed865
mov byte [ecx + eax], 0xd
inc ecx
mov eax, dword [ebx + 0x85c4]
mov byte [ecx + eax], 0xa
cmp dword [ebx + 0x224], 0
jne 0x5ed874
add dword [ebx + 0x1f0], 1
adc dword [ebx + 0x1f4], 0
jmp 0x5ed874
mov bl, byte [ebp - 0xb1]
mov byte [ecx + eax], bl
mov ebx, dword [ebp - 0xc0]
inc edx
inc ecx
cmp edx, edi
jl 0x5ed824
cmp ecx, edi
mov edi, dword [ebp - 0xac]
je 0x5ed8e3
mov eax, dword [ebx + 0x85c4]
mov dword [ebx + 0x114], eax
mov dword [ebx + 0x110], ecx
jmp 0x5ed8e3
test byte [esi + 0xa8], 0x20
jne 0x5edaed
mov ecx, dword [ebp - 0xac]
and dword [esi + 0xa8], 0xfffffffd
cmp dword [ecx + 0x1e0], 0
je 0x5edaed
call fcn.005ecae4
test eax, eax
je 0x5edaed
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005f4f86
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp - 0xac]
mov eax, dword [edi + 0x228]
xor ecx, ecx
cmp eax, dword [edi + 0x138]
lea eax, [ebp - 0xb0]
push eax
push dword [ebx + 0x110]
sete cl
mov dword [ebp - 0xb0], 0
push dword [ebx + 0x114]
push ecx
mov eax, dword [edi + ecx*4 + 0x14c]
push edi
call eax
add esp, 0x14
mov dword [ebp - 0xac], eax
test eax, eax
jns 0x5ed94a
mov eax, dword [ebp - 0xb0]
test eax, eax
je 0x5eda44
cmp eax, 0x51
jne 0x5edaef
mov dword [ebp - 0xac], 0
cmp dword [ebx + 0x31c], 0
je 0x5ed9e0
cmp dword [ebx + 0x2d0], 0
mov ecx, dword [ebx + 0x114]
mov dword [ebp - 0xb0], ecx
je 0x5eda8c
mov eax, dword [edi + 0x84]
test eax, eax
je 0x5eda8c
push eax
push 0x1003ecd0
push 0x1003ecb8
push 0x1003ecd4
lea eax, [ebp - 0xa8]
push 0xa0
push eax
call fcn.005e4e84
lea edi, [ebp - 0xa8]
add esp, 0x18
lea ecx, [edi + 1]
mov al, byte [edi]
inc edi
test al, al
jne 0x5ed9ab
mov eax, dword [ebx + 0x1a0]
sub edi, ecx
test eax, eax
je 0x5eda5a
push dword [ebx + 0x12c]
lea ecx, [ebp - 0xa8]
push edi
push ecx
push 0
push ebx
call eax
add esp, 0x14
test eax, eax
je 0x5eda86
mov edi, dword [ebp - 0xac]
mov eax, edi
cdq
add dword [esi + 0x28], eax
mov eax, dword [esi + 0x28]
adc dword [esi + 0x2c], edx
cmp eax, dword [ebx + 0x1f0]
jne 0x5eda1d
mov eax, dword [esi + 0x2c]
cmp eax, dword [ebx + 0x1f4]
jne 0x5eda1d
push 0x1003fd74
push ebx
mov dword [esi + 0xac], 1
call fcn.005ea104
add esp, 8
mov ecx, dword [ebx + 0x110]
mov eax, dword [ebp - 0xac]
cmp ecx, eax
je 0x5edab5
sub ecx, eax
add dword [ebx + 0x114], eax
mov dword [ebx + 0x110], ecx
jmp 0x5edadb
mov eax, 0x37
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005f4f86
mov esp, ebp
pop ebp
ret
push dword [ebx + 0x128]
push 1
push 2
push 0x1003d07c
call fcn.005f85f1
push dword [ebx + 0x128]
lea eax, [ebp - 0xa8]
push 1
push edi
push eax
call fcn.005f85f1
add esp, 0x20
mov ecx, dword [ebp - 0xb0]
mov eax, dword [ebx + 0x1a0]
mov edi, dword [ebp - 0xac]
test eax, eax
je 0x5ed9e6
push dword [ebx + 0x12c]
push edi
push ecx
push 4
push ebx
call eax
add esp, 0x14
jmp 0x5ed9e6
mov eax, dword [esi + 0xa0]
mov dword [ebx + 0x114], eax
mov dword [ebx + 0x110], 0
cmp dword [esi + 0xac], 0
je 0x5edadb
and dword [esi + 0xa8], 0xfffffffd
mov eax, dword [esi + 0x28]
mov dword [ebx + 0x498], eax
mov eax, dword [esi + 0x2c]
mov dword [ebx + 0x49c], eax
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.005f4f86
mov esp, ebp
pop ebp
ret