Function at 0x59ceb0
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x148
mov eax, dword [ebp + 8]
mov dword [ebp - 0x90], eax
cmp dword [ebp - 0x90], 0
jne 0x59ced3
or eax, 0xffffffff
jmp 0x59da74
mov ecx, dword [ebp - 0x90]
cmp dword [ecx + 4], 0
jne 0x59cf1d
mov edx, dword [ebp - 0x90]
mov eax, dword [edx]
push eax
call fcn.005e904f
add esp, 4
mov ecx, dword [ebp - 0x90]
mov dword [ebp - 0x13c], ecx
mov edx, dword [ebp - 0x13c]
push edx
call fcn.005c4775
add esp, 4
mov dword [ebp - 0x90], 0
or eax, 0xffffffff
jmp 0x59da74
mov ecx, dword [ebp - 0x90]
mov eax, 0xf4240
cdq
idiv dword [ecx + 4]
mov dword [ebp - 0xd8], eax
mov dword [ebp - 0xd4], 0xc350
mov dword [ebp - 0xd0], 0
mov dword [ebp - 0xcc], 0x910
mov edx, dword [ebp - 0x90]
mov eax, dword [edx + 0x1c]
mov dword [ebp - 0xc8], eax
mov dword [ebp - 0xc4], 0
mov ecx, dword [ebp - 0x90]
movzx edx, byte [ecx + 0x19]
neg edx
sbb edx, edx
neg edx
add edx, 1
mov dword [ebp - 0xc0], edx
mov dword [ebp - 0xbc], 0x100000
mov eax, dword [ebp - 0x90]
mov ecx, dword [eax + 8]
mov dword [ebp - 0xb8], ecx
mov edx, dword [ebp - 0x90]
mov eax, dword [edx + 0xc]
mov dword [ebp - 0xb4], eax
mov dword [ebp - 0xa4], 0
mov ecx, dword [ebp - 0xa4]
mov dword [ebp - 0xa8], ecx
mov edx, dword [ebp - 0xa8]
mov dword [ebp - 0xac], edx
mov eax, dword [ebp - 0xac]
mov dword [ebp - 0xb0], eax
mov dword [ebp - 0x38], 0x73646976
mov dword [ebp - 0x34], 0x34363248
mov dword [ebp - 0x30], 0
mov word [ebp - 0x2c], 0
mov word [ebp - 0x2a], 0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0x3e8
mov ecx, dword [ebp - 0x90]
cmp dword [ecx + 4], 0x1e
jne 0x59d01c
mov dword [ebp - 0x20], 0x7512
jmp 0x59d02e
mov edx, dword [ebp - 0x90]
mov eax, dword [edx + 4]
imul eax, eax, 0x3e8
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], 0
mov ecx, dword [ebp - 0x90]
mov edx, dword [ecx + 0x1c]
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x14], 0x100000
mov dword [ebp - 0x10], 0xffffffff
mov dword [ebp - 0xc], 0
mov word [ebp - 6], 0
mov ax, word [ebp - 6]
mov word [ebp - 8], ax
mov ecx, dword [ebp - 0x90]
mov dx, word [ecx + 8]
mov word [ebp - 4], dx
mov eax, dword [ebp - 0x90]
mov cx, word [eax + 0xc]
mov word [ebp - 2], cx
push 0x38
push 0
lea edx, [ebp - 0x84]
push edx
call fcn.005e5330
add esp, 0xc
mov dword [ebp - 0x84], 0x73647561
mov dword [ebp - 0x80], 1
mov dword [ebp - 0x7c], 0
mov word [ebp - 0x78], 0
mov word [ebp - 0x76], 0
mov dword [ebp - 0x74], 0
mov dword [ebp - 0x70], 2
mov dword [ebp - 0x6c], 0x3e80
mov dword [ebp - 0x68], 0
mov dword [ebp - 0x64], 0xecf
mov dword [ebp - 0x60], 0x3c0
mov dword [ebp - 0x5c], 0xffffffff
mov dword [ebp - 0x58], 2
mov word [ebp - 6], 0
mov ax, word [ebp - 6]
mov word [ebp - 0x54], ax
mov word [ebp - 0x50], 0
mov word [ebp - 0x4e], 0
mov dword [ebp - 0x11c], 0x28
mov ecx, dword [ebp - 0x90]
mov edx, dword [ecx + 8]
mov dword [ebp - 0x118], edx
mov eax, dword [ebp - 0x90]
mov ecx, dword [eax + 0xc]
mov dword [ebp - 0x114], ecx
mov word [ebp - 0x110], 1
mov word [ebp - 0x10e], 0x18
mov dword [ebp - 0x10c], 0x34363248
mov edx, dword [ebp - 0x90]
mov eax, dword [ebp - 0x90]
mov ecx, dword [edx + 8]
imul ecx, dword [eax + 0xc]
imul ecx, ecx, 3
mov dword [ebp - 0x108], ecx
mov dword [ebp - 0x104], 0
mov dword [ebp - 0x100], 0
mov dword [ebp - 0xfc], 0
mov dword [ebp - 0xf8], 0
mov word [ebp - 0xe8], 1
mov word [ebp - 0xe6], 1
mov edx, dword [ebp - 0x90]
mov eax, dword [edx + 0x10]
mov dword [ebp - 0xe4], eax
mov ecx, dword [ebp - 0x90]
mov eax, dword [ecx + 0x14]
cdq
and edx, 7
add eax, edx
sar eax, 3
movzx edx, word [ebp - 0xe6]
imul eax, edx
mov word [ebp - 0xdc], ax
movzx eax, word [ebp - 0xdc]
imul eax, dword [ebp - 0xe4]
mov dword [ebp - 0xe0], eax
mov word [ebp - 0xda], 0x10
mov ecx, dword [ebp - 0x90]
mov edx, dword [ecx + 0x76720]
shl edx, 4
mov dword [ebp - 0x9c], edx
push 0x68151c
mov eax, dword [ebp - 0x90]
add eax, 0x20
push eax
call fcn.005e918f
add esp, 8
mov dword [ebp - 0xf4], eax
cmp dword [ebp - 0xf4], 0
je 0x59d267
push 2
push 0
mov ecx, dword [ebp - 0xf4]
push ecx
call fcn.005e9229
add esp, 0xc
mov edx, dword [ebp - 0xf4]
push edx
call fcn.005ea8ca
add esp, 4
mov dword [ebp - 0x120], eax
mov eax, dword [ebp - 0x9c]
add eax, dword [ebp - 0x120]
mov dword [ebp - 0x9c], eax
push 2
push 0
mov ecx, dword [ebp - 0x90]
mov edx, dword [ecx]
push edx
call fcn.005e9229
add esp, 0xc
mov eax, dword [ebp - 0x90]
mov ecx, dword [eax]
push ecx
call fcn.005ea8ca
add esp, 4
mov dword [ebp - 0x48], eax
mov edx, dword [ebp - 0x48]
and edx, reloc.NetSDK.dll_Ordinal_1
jns 0x59d2a0
dec edx
or edx, 0xfffffffe
inc edx
cmp edx, 1
jne 0x59d2c8
mov eax, dword [ebp - 0x90]
mov ecx, dword [eax]
push ecx
push 1
push 1
push 0x681520
call fcn.005e96c4
add esp, 0x10
mov edx, dword [ebp - 0x48]
add edx, 1
mov dword [ebp - 0x48], edx
mov eax, dword [ebp - 0x90]
add eax, 0xc20
mov dword [ebp - 0xf0], eax
push str.RIFF
mov ecx, dword [ebp - 0xf0]
push ecx
call fcn.0059c9e0
add esp, 8
mov edx, dword [ebp - 0xf0]
add edx, 4
mov dword [ebp - 0xf0], edx
mov eax, dword [ebp - 0x48]
add eax, dword [ebp - 0x9c]
mov dword [ebp - 0x88], eax
push 4
lea ecx, [ebp - 0x88]
push ecx
mov edx, dword [ebp - 0xf0]
push edx
call fcn.005e5550
add esp, 0xc
mov eax, dword [ebp - 0xf0]
add eax, 4
mov dword [ebp - 0xf0], eax
push str.AVI
mov ecx, dword [ebp - 0xf0]
push ecx
call fcn.0059c9e0
add esp, 8
mov edx, dword [ebp - 0xf0]
add edx, 4
mov dword [ebp - 0xf0], edx
push 0x681534
mov eax, dword [ebp - 0xf0]
push eax
call fcn.0059c9e0
add esp, 8
mov ecx, dword [ebp - 0xf0]
add ecx, 4
mov dword [ebp - 0xf0], ecx
mov dword [ebp - 0x4c], 0x74
mov dword [ebp - 0x8c], 0x5c
mov edx, dword [ebp - 0x4c]
add edx, 0x4c
mov dword [ebp - 0xa0], edx
mov eax, dword [ebp - 0x90]
movzx ecx, byte [eax + 0x19]
test ecx, ecx
je 0x59d3b9
mov edx, dword [ebp - 0x8c]
mov eax, dword [ebp - 0xa0]
lea ecx, [eax + edx + 8]
mov dword [ebp - 0xa0], ecx
push 4
lea edx, [ebp - 0xa0]
push edx
mov eax, dword [ebp - 0xf0]
push eax
call fcn.005e5550
add esp, 0xc
mov ecx, dword [ebp - 0xf0]
add ecx, 4
mov dword [ebp - 0xf0], ecx
push str.hdrl
mov edx, dword [ebp - 0xf0]
push edx
call fcn.0059c9e0
add esp, 8
mov eax, dword [ebp - 0xf0]
add eax, 4
mov dword [ebp - 0xf0], eax
push str.avih
mov ecx, dword [ebp - 0xf0]
push ecx
call fcn.0059c9e0
add esp, 8
mov edx, dword [ebp - 0xf0]
add edx, 4
mov dword [ebp - 0xf0], edx
mov dword [ebp - 0xec], 0x38
push 4
lea eax, [ebp - 0xec]
push eax
mov ecx, dword [ebp - 0xf0]
push ecx
call fcn.005e5550
add esp, 0xc
mov edx, dword [ebp - 0xf0]
add edx, 4
mov dword [ebp - 0xf0], edx
mov eax, dword [ebp - 0xec]
push eax
lea ecx, [ebp - 0xd8]
push ecx
mov edx, dword [ebp - 0xf0]
push edx
call fcn.005e5550
add esp, 0xc
mov eax, dword [ebp - 0xf0]
add eax, dword [ebp - 0xec]
mov dword [ebp - 0xf0], eax
push 0x68154c
mov ecx, dword [ebp - 0xf0]
push ecx
call fcn.0059c9e0
add esp, 8
mov edx, dword [ebp - 0xf0]
add edx, 4
mov dword [ebp - 0xf0], edx
mov eax, dword [ebp - 0x4c]
mov dword [ebp - 0x98], eax
push 4
lea ecx, [ebp - 0x98]
push ecx
mov edx, dword [ebp - 0xf0]
push edx
call fcn.005e5550
add esp, 0xc
mov eax, dword [ebp - 0xf0]
add eax, 4
mov dword [ebp - 0xf0], eax
push 0x681554
mov ecx, dword [ebp - 0xf0]
push ecx
call fcn.0059c9e0
add esp, 8
mov edx, dword [ebp - 0xf0]
add edx, 4
mov dword [ebp - 0xf0], edx
push 0x68155c
mov eax, dword [ebp - 0xf0]
push eax
call fcn.0059c9e0
add esp, 8
mov ecx, dword [ebp - 0xf0]
add ecx, 4
mov dword [ebp - 0xf0], ecx
mov dword [ebp - 0x94], 0x38
push 4
lea edx, [ebp - 0x94]
push edx
mov eax, dword [ebp - 0xf0]
push eax
call fcn.005e5550
add esp, 0xc
mov ecx, dword [ebp - 0xf0]
add ecx, 4
mov dword [ebp - 0xf0], ecx
mov edx, dword [ebp - 0x94]
push edx
lea eax, [ebp - 0x38]
push eax
mov ecx, dword [ebp - 0xf0]
push ecx
call fcn.005e5550
add esp, 0xc
mov edx, dword [ebp - 0xf0]
add edx, dword [ebp - 0x94]
mov dword [ebp - 0xf0], edx
push 0x681564
mov eax, dword [ebp - 0xf0]
push eax
call fcn.0059c9e0
add esp, 8
mov ecx, dword [ebp - 0xf0]
add ecx, 4
mov dword [ebp - 0xf0], ecx
mov dword [ebp - 0x40], 0x28
push 4
lea edx, [ebp - 0x40]
push edx
mov eax, dword [ebp - 0xf0]
push eax
call fcn.005e5550
add esp, 0xc
mov ecx, dword [ebp - 0xf0]
add ecx, 4
mov dword [ebp - 0xf0], ecx
mov edx, dword [ebp - 0x40]
push edx
lea eax, [ebp - 0x11c]
push eax
mov ecx, dword [ebp - 0xf0]
push ecx
call fcn.005e5550
add esp, 0xc
mov edx, dword [ebp - 0xf0]
add edx, dword [ebp - 0x40]
mov dword [ebp - 0xf0], edx
mov eax, dword [ebp - 0x90]
movzx ecx, byte [eax + 0x19]
test ecx, ecx
je 0x59d784
push 0x68156c
mov edx, dword [ebp - 0xf0]
push edx
call fcn.0059c9e0
add esp, 8
mov eax, dword [ebp - 0xf0]
add eax, 4
mov dword [ebp - 0xf0], eax
mov ecx, dword [ebp - 0x8c]
mov dword [ebp - 0x12c], ecx
push 4
lea edx, [ebp - 0x12c]
push edx
mov eax, dword [ebp - 0xf0]
push eax
call fcn.005e5550
add esp, 0xc
mov ecx, dword [ebp - 0xf0]
add ecx, 4
mov dword [ebp - 0xf0], ecx
push str.strl
mov edx, dword [ebp - 0xf0]
push edx
call fcn.0059c9e0
add esp, 8
mov eax, dword [ebp - 0xf0]
add eax, 4
mov dword [ebp - 0xf0], eax
push str.strh
mov ecx, dword [ebp - 0xf0]
push ecx
call fcn.0059c9e0
add esp, 8
mov edx, dword [ebp - 0xf0]
add edx, 4
mov dword [ebp - 0xf0], edx
mov dword [ebp - 0x128], 0x38
push 4
lea eax, [ebp - 0x128]
push eax
mov ecx, dword [ebp - 0xf0]
push ecx
call fcn.005e5550
add esp, 0xc
mov edx, dword [ebp - 0xf0]
add edx, 4
mov dword [ebp - 0xf0], edx
mov eax, dword [ebp - 0x128]
push eax
lea ecx, [ebp - 0x84]
push ecx
mov edx, dword [ebp - 0xf0]
push edx
call fcn.005e5550
add esp, 0xc
mov eax, dword [ebp - 0xf0]
add eax, dword [ebp - 0x128]
mov dword [ebp - 0xf0], eax
push str.strf
mov ecx, dword [ebp - 0xf0]
push ecx
call fcn.0059c9e0
add esp, 8
mov edx, dword [ebp - 0xf0]
add edx, 4
mov dword [ebp - 0xf0], edx
mov dword [ebp - 0x124], 0x10
push 4
lea eax, [ebp - 0x124]
push eax
mov ecx, dword [ebp - 0xf0]
push ecx
call fcn.005e5550
add esp, 0xc
mov edx, dword [ebp - 0xf0]
add edx, 4
mov dword [ebp - 0xf0], edx
mov eax, dword [ebp - 0x124]
push eax
lea ecx, [ebp - 0xe8]
push ecx
mov edx, dword [ebp - 0xf0]
push edx
call fcn.005e5550
add esp, 0xc
mov eax, dword [ebp - 0xf0]
add eax, dword [ebp - 0x124]
mov dword [ebp - 0xf0], eax
push str.JUNK
mov ecx, dword [ebp - 0xf0]
push ecx
call fcn.0059c9e0
add esp, 8
mov edx, dword [ebp - 0xf0]
add edx, 4
mov dword [ebp - 0xf0], edx
mov eax, dword [ebp - 0x90]
add eax, 0xc20
mov ecx, dword [ebp - 0xf0]
sub ecx, eax
mov edx, 0x800
sub edx, ecx
sub edx, 0x10
mov dword [ebp - 0x3c], edx
push 4
lea eax, [ebp - 0x3c]
push eax
mov ecx, dword [ebp - 0xf0]
push ecx
call fcn.005e5550
add esp, 0xc
mov edx, dword [ebp - 0xf0]
add edx, 4
mov dword [ebp - 0xf0], edx
mov eax, dword [ebp - 0xf0]
add eax, dword [ebp - 0x3c]
mov dword [ebp - 0xf0], eax
push 0x681594
mov ecx, dword [ebp - 0xf0]
push ecx
call fcn.0059c9e0
add esp, 8
mov edx, dword [ebp - 0xf0]
add edx, 4
mov dword [ebp - 0xf0], edx
mov eax, dword [ebp - 0x48]
sub eax, 0x7fc
mov dword [ebp - 0x44], eax
push 4
lea ecx, [ebp - 0x44]
push ecx
mov edx, dword [ebp - 0xf0]
push edx
call fcn.005e5550
add esp, 0xc
mov eax, dword [ebp - 0xf0]
add eax, 4
mov dword [ebp - 0xf0], eax
push str.movi
mov ecx, dword [ebp - 0xf0]
push ecx
call fcn.0059c9e0
add esp, 8
mov edx, dword [ebp - 0xf0]
add edx, 4
mov dword [ebp - 0xf0], edx
push 0
push 0
mov eax, dword [ebp - 0x90]
mov ecx, dword [eax]
push ecx
call fcn.005e9229
add esp, 0xc
mov edx, dword [ebp - 0x90]
mov eax, dword [edx]
push eax
push 0x800
push 1
mov ecx, dword [ebp - 0x90]
add ecx, 0xc20
push ecx
call fcn.005e96c4
add esp, 0x10
push 2
push 0
mov edx, dword [ebp - 0x90]
mov eax, dword [edx]
push eax
call fcn.005e9229
add esp, 0xc
mov ecx, dword [ebp - 0x90]
mov edx, dword [ecx]
push edx
push 4
push 1
push str.idx1
call fcn.005e96c4
add esp, 0x10
mov eax, dword [ebp - 0x90]
mov ecx, dword [eax]
push ecx
push 4
push 1
lea edx, [ebp - 0x9c]
push edx
call fcn.005e96c4
add esp, 0x10
cmp dword [ebp - 0xf4], 0
je 0x59d9b2
mov dword [ebp - 0x130], 0xc800
push 0xc800
call fcn.005c4770
add esp, 4
mov dword [ebp - 0x140], eax
mov eax, dword [ebp - 0x140]
mov dword [ebp - 0x134], eax
push 0
push 0
mov ecx, dword [ebp - 0xf4]
push ecx
call fcn.005e9229
add esp, 0xc
mov edx, 1
test edx, edx
je 0x59d997
mov eax, dword [ebp - 0xf4]
push eax
push 0xc800
push 1
mov ecx, dword [ebp - 0x134]
push ecx
call fcn.005e954a
add esp, 0x10
mov dword [ebp - 0x138], eax
cmp dword [ebp - 0x138], 0
jg 0x59d974
jmp 0x59d997
mov edx, dword [ebp - 0x90]
mov eax, dword [edx]
push eax
mov ecx, dword [ebp - 0x138]
push ecx
push 1
mov edx, dword [ebp - 0x134]
push edx
call fcn.005e96c4
add esp, 0x10
jmp 0x59d93d
mov eax, dword [ebp - 0x134]
mov dword [ebp - 0x144], eax
mov ecx, dword [ebp - 0x144]
push ecx
call fcn.005c4775
add esp, 4
mov edx, dword [ebp - 0x90]
mov eax, dword [edx]
push eax
mov ecx, dword [ebp - 0x90]
mov edx, dword [ecx + 0x76720]
shl edx, 4
push edx
push 1
mov eax, dword [ebp - 0x90]
add eax, 0x1420
push eax
call fcn.005e96c4
add esp, 0x10
push 0x10
push 0
mov ecx, dword [ebp - 0x90]
add ecx, 0xc20
push ecx
call fcn.005e5330
add esp, 0xc
mov edx, dword [ebp - 0x90]
mov eax, dword [edx]
push eax
push 0x10
push 1
mov ecx, dword [ebp - 0x90]
add ecx, 0xc20
push ecx
call fcn.005e96c4
add esp, 0x10
cmp dword [ebp - 0xf4], 0
je 0x59da46
mov edx, dword [ebp - 0xf4]
push edx
call fcn.005e904f
add esp, 4
mov eax, dword [ebp - 0x90]
add eax, 0x20
push eax
call fcn.005edef8
add esp, 4
mov ecx, dword [ebp - 0x90]
mov edx, dword [ecx]
push edx
call fcn.005e904f
add esp, 4
mov eax, dword [ebp - 0x90]
mov dword [ebp - 0x148], eax
mov ecx, dword [ebp - 0x148]
push ecx
call fcn.005c4775
add esp, 4
xor eax, eax
mov esp, ebp
pop ebp
ret