Function at 0x4ed45f
Capabilities:
Write file on windows

Disassembly:
sub esp, 8
push esi
mov esi, dword [esp + 0x10]
test esi, esi
jne 0x4ed324
or eax, 0xffffffff
pop esi
add esp, 8
ret
mov eax, dword [esp + 0x14]
test eax, eax
mov ecx, dword [esp + 0x18]
push edi
mov edi, eax
mov dword [esp + 8], ecx
je 0x4ed559
cmp ecx, 0x10
jle 0x4ed559
push ebx
push ebp
mov ebp, dword [esp + 0x28]
mov edx, dword [ebp + 0x10]
cmp edx, 1
mov bl, 1
mov byte [esp + 0x1c], 0
mov dword [esp + 0x14], 0
jne 0x4ed3d0
cmp dword [ebp + 0x14], 0
jne 0x4ed3c0
mov byte [esi + 0x18], dl
mov byte [esp + 0x1c], dl
movzx edx, byte [eax + 5]
and edx, 0x1f
mov dword [esi + 4], edx
movzx edx, byte [eax + 6]
add edx, edx
add edx, edx
add edx, edx
mov dword [esi + 8], edx
movzx edx, byte [eax + 7]
add dword [esi + 0x1c], 1
add ecx, 0xfffffff0
add edx, edx
mov dword [esp + 0x10], ecx
add edx, edx
xor ecx, ecx
add edx, edx
mov dword [esi + 0xc], edx
mov ch, byte [eax + 0xb]
movzx edx, byte [eax + 9]
lea edi, [eax + 0x10]
mov cl, byte [eax + 0xa]
movzx eax, byte [eax + 8]
shl ecx, 8
or ecx, edx
shl ecx, 8
or ecx, eax
mov dword [esp + 0x14], ecx
jmp 0x4ed403
add dword [esi + 0x1c], 1
add ecx, 0xfffffff8
lea edi, [eax + 8]
mov dword [esp + 0x10], ecx
jmp 0x4ed403
cmp edx, 2
jne 0x4ed403
lea edx, [esp + 0x10]
push edx
add ecx, 0xfffffff8
push ecx
lea edi, [esi + 0x420]
add eax, 8
push edi
push eax
call fcn.004ed220
mov byte [esi + 0x19], 1
mov eax, dword [ebp + 0x4c]
mov dword [esi + 0x14], eax
mov ecx, dword [ebp + 0x50]
add esp, 0x10
xor bl, bl
mov dword [esi + 0x10], ecx
cmp byte [esi + 0x18], 0
jne 0x4ed414
pop ebp
pop ebx
pop edi
or eax, 0xffffffff
pop esi
add esp, 8
ret
test bl, bl
je 0x4ed494
mov bl, byte [esp + 0x1c]
mov edx, dword [esi]
mov ebp, dword [str.00dc]
neg bl
push edx
push 4
push 1
push str.00dc
sbb ebx, ebx
and ebx, 0x10
call fcn.00536144
add esp, 0x10
cmp byte [esp + 0x1c], 0
je 0x4ed4b0
mov ecx, dword [esi]
add dword [esp + 0x10], 8
push ecx
push 4
lea edx, [esp + 0x18]
push 1
push edx
call fcn.00536144
mov eax, dword [esi]
push eax
push 4
push 1
push 0x5d4ecc
call fcn.00536144
mov ecx, dword [esi]
push ecx
push 4
lea edx, [esp + 0x3c]
push 1
push edx
call fcn.00536144
mov eax, dword [esi]
mov ecx, dword [esp + 0x40]
push eax
add ecx, 0xfffffff8
push ecx
push 1
push edi
call fcn.00536144
add esp, 0x40
jmp 0x4ed4d4
mov eax, dword [esi]
mov ebp, dword [str.01wb]
push eax
push 4
push 1
push str.01wb
xor ebx, ebx
call fcn.00536144
add esp, 0x10
mov edx, dword [esi]
push edx
push 4
lea eax, [esp + 0x18]
push 1
push eax
call fcn.00536144
mov ecx, dword [esi]
mov edx, dword [esp + 0x20]
push ecx
push edx
push 1
push edi
call fcn.00536144
add esp, 0x20
mov eax, dword [esp + 0x10]
mov ecx, dword [esi + 0x76724]
lea edx, [ecx + eax + 8]
mov dword [esi + 0x76724], edx
mov edx, eax
mov eax, dword [esi + 0x76720]
add eax, 0x142
shl eax, 4
add eax, esi
mov dword [eax], ebp
mov dword [eax + 4], ebx
mov dword [eax + 8], ecx
mov dword [eax + 0xc], edx
add dword [esi + 0x76720], 1
cmp dword [esi + 0x76720], 0x7530
jl 0x4ed54f
lea eax, [esi + 0x20]
push 0x594548
push eax
call fcn.00533f90
mov edi, eax
push edi
push 0x75300
lea ecx, [esi + 0x1420]
push 1
push ecx
call fcn.00536144
push edi
call fcn.00533b3e
add esp, 0x1c
mov dword [esi + 0x76720], 0
pop ebp
pop ebx
pop edi
xor eax, eax
pop esi
add esp, 8
ret
pop edi
or eax, 0xffffffff
pop esi
add esp, 8
ret