Function at 0x59ad40
Capabilities:
Read file on windows

Disassembly:
sub esp, 0xb0
mov eax, dword [0x6d7160]
xor eax, esp
mov dword [esp + 0xac], eax
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov edi, dword [esi]
mov word [esi + 4], 0x4949
cmp dword [edi + 0x14], 0
je 0x59ad78
mov eax, 4
lea ebx, [esp + 0x10]
call fcn.00410220
jmp 0x59ad91
mov edi, dword [edi + 4]
test edi, edi
je 0x59ad91
push edi
push 1
lea eax, [esp + 0x18]
push 4
push eax
call fcn.0060860a
add esp, 0x10
call fcn.0057e000
mov ebp, eax
mov eax, dword [esi]
cmp dword [eax + 0x14], 0
je 0x59ada5
mov eax, dword [eax + 0x18]
jmp 0x59adb1
mov ecx, dword [eax + 4]
push ecx
call fcn.00609413
add esp, 4
add eax, ebp
mov dword [esp + 0x14], eax
mov eax, 4
mov ecx, str.RIFF
lea edx, [esp + 0x10]
mov edi, dword [edx]
cmp edi, dword [ecx]
jne 0x59addd
sub eax, 4
add ecx, 4
add edx, 4
cmp eax, 4
jae 0x59adc5
test eax, eax
je 0x59ae3a
movzx edi, byte [edx]
movzx ebx, byte [ecx]
sub edi, ebx
jne 0x59ae2c
sub eax, 1
add ecx, 1
add edx, 1
test eax, eax
je 0x59ae3a
movzx edi, byte [edx]
movzx ebx, byte [ecx]
sub edi, ebx
jne 0x59ae2c
sub eax, 1
add ecx, 1
add edx, 1
test eax, eax
je 0x59ae3a
movzx edi, byte [edx]
movzx ebx, byte [ecx]
sub edi, ebx
jne 0x59ae2c
sub eax, 1
add ecx, 1
add edx, 1
test eax, eax
je 0x59ae3a
movzx edi, byte [edx]
movzx edx, byte [ecx]
sub edi, edx
je 0x59ae3a
test edi, edi
mov eax, 1
jg 0x59ae3c
or eax, 0xffffffff
jmp 0x59ae3c
xor eax, eax
test eax, eax
je 0x59b1d4
mov eax, 4
mov ecx, str.LIST
lea edx, [esp + 0x10]
mov edi, dword [edx]
cmp edi, dword [ecx]
jne 0x59ae6a
sub eax, 4
add ecx, 4
add edx, 4
cmp eax, 4
jae 0x59ae52
test eax, eax
je 0x59aec7
movzx ebx, byte [ecx]
movzx edi, byte [edx]
sub edi, ebx
jne 0x59aeb9
sub eax, 1
add ecx, 1
add edx, 1
test eax, eax
je 0x59aec7
movzx ebx, byte [ecx]
movzx edi, byte [edx]
sub edi, ebx
jne 0x59aeb9
sub eax, 1
add ecx, 1
add edx, 1
test eax, eax
je 0x59aec7
movzx ebx, byte [ecx]
movzx edi, byte [edx]
sub edi, ebx
jne 0x59aeb9
sub eax, 1
add ecx, 1
add edx, 1
test eax, eax
je 0x59aec7
movzx eax, byte [ecx]
movzx edi, byte [edx]
sub edi, eax
je 0x59aec7
test edi, edi
mov eax, 1
jg 0x59aec9
or eax, 0xffffffff
jmp 0x59aec9
xor eax, eax
test eax, eax
je 0x59b1d4
mov eax, 4
mov ecx, str.nctg
lea edx, [esp + 0x10]
nop
mov edi, dword [edx]
cmp edi, dword [ecx]
jne 0x59aef8
sub eax, 4
add ecx, 4
add edx, 4
cmp eax, 4
jae 0x59aee0
test eax, eax
je 0x59af55
movzx edi, byte [edx]
movzx ebx, byte [ecx]
sub edi, ebx
jne 0x59af47
sub eax, 1
add ecx, 1
add edx, 1
test eax, eax
je 0x59af55
movzx edi, byte [edx]
movzx ebx, byte [ecx]
sub edi, ebx
jne 0x59af47
sub eax, 1
add ecx, 1
add edx, 1
test eax, eax
je 0x59af55
movzx edi, byte [edx]
movzx ebx, byte [ecx]
sub edi, ebx
jne 0x59af47
sub eax, 1
add ecx, 1
add edx, 1
test eax, eax
je 0x59af55
movzx edi, byte [edx]
movzx ecx, byte [ecx]
sub edi, ecx
je 0x59af55
test edi, edi
mov eax, 1
jg 0x59af57
or eax, 0xffffffff
jmp 0x59af57
xor eax, eax
test eax, eax
jne 0x59aff4
mov eax, dword [esi]
call fcn.00410270
mov ebx, dword [esp + 0x14]
add eax, 7
cmp eax, ebx
jae 0x59afdb
call fcn.0057df50
movzx edi, ax
call fcn.0057df50
add edi, 1
and edi, 0xfffffffe
cmp edi, 0x14
movzx ecx, ax
jne 0x59af9b
cmp ecx, edi
jne 0x59af9b
push 0
mov ecx, esi
call fcn.005948f0
jmp 0x59afcd
mov eax, dword [esi]
cmp dword [eax + 0x14], 0
je 0x59afbe
mov edx, dword [eax + 0x18]
cmp edx, 0xffffffff
je 0x59afcd
add ecx, edx
mov edx, dword [eax + 0x1c]
cmp edx, ecx
mov dword [eax + 0x18], ecx
ja 0x59afb9
mov ecx, edx
mov dword [eax + 0x18], ecx
jmp 0x59afcd
mov edx, dword [eax + 4]
push 1
push ecx
push edx
call fcn.006081d8
add esp, 0xc
mov eax, dword [esi]
call fcn.00410270
add eax, 7
cmp eax, ebx
jb 0x59af71
mov ecx, dword [esp + 0xbc]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00607d6d
add esp, 0xb0
ret
mov eax, 4
mov ecx, str.IDIT
lea edx, [esp + 0x10]
mov edi, dword [edx]
cmp edi, dword [ecx]
jne 0x59b01a
sub eax, 4
add ecx, 4
add edx, 4
cmp eax, 4
jae 0x59b002
test eax, eax
je 0x59b077
movzx ebx, byte [ecx]
movzx edi, byte [edx]
sub edi, ebx
jne 0x59b069
sub eax, 1
add ecx, 1
add edx, 1
test eax, eax
je 0x59b077
movzx ebx, byte [ecx]
movzx edi, byte [edx]
sub edi, ebx
jne 0x59b069
sub eax, 1
add ecx, 1
add edx, 1
test eax, eax
je 0x59b077
movzx ebx, byte [ecx]
movzx edi, byte [edx]
sub edi, ebx
jne 0x59b069
sub eax, 1
add ecx, 1
add edx, 1
test eax, eax
je 0x59b077
movzx eax, byte [ecx]
movzx edi, byte [edx]
sub edi, eax
je 0x59b077
test edi, edi
mov eax, 1
jg 0x59b079
or eax, 0xffffffff
jmp 0x59b079
xor eax, eax
test eax, eax
jne 0x59b196
cmp ebp, 0x40
jae 0x59b196
mov edi, dword [esi]
cmp dword [edi + 0x14], eax
je 0x59b0a1
mov eax, 0x40
lea ebx, [esp + 0x3c]
call fcn.00410220
jmp 0x59b0ba
mov edi, dword [edi + 4]
test edi, edi
je 0x59b0ba
push edi
push 1
lea ecx, [esp + 0x44]
push 0x40
push ecx
call fcn.0060860a
add esp, 0x10
xor eax, eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
lea edx, [esp + 0x2c]
push edx
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x24]
push ecx
lea edx, [esp + 0x2c]
push edx
lea eax, [esp + 0x34]
push eax
lea ecx, [esp + 0x90]
push ecx
lea edx, [esp + 0x54]
push str._s__s__d__d:_d:_d__d
push edx
mov byte [esp + ebp + 0x5c], 0
call fcn.006094e9
add esp, 0x20
cmp eax, 6
jne 0x59afdb
xor edi, edi
mov ebx, 0x6b6364
lea eax, [esp + 0x7c]
push eax
push ebx
call fcn.00617c59
add esp, 8
test eax, eax
je 0x59b145
add edi, 1
add ebx, 4
cmp edi, 0xc
jb 0x59b128
sub dword [esp + 0x2c], 0x76c
lea ecx, [esp + 0x18]
push ecx
mov dword [esp + 0x2c], edi
mov dword [esp + 0x3c], 0xffffffff
call fcn.0061b471
add esp, 4
test edx, edx
jl 0x59afdb
jg 0x59b178
test eax, eax
jbe 0x59afdb
lea edx, [esp + 0x18]
push edx
call fcn.0061b471
add esp, 4
mov dword [esi + 0x328], eax
mov dword [esi + 0x32c], edx
jmp 0x59afdb
mov eax, dword [esi]
cmp dword [eax + 0x14], 0
je 0x59b1c0
mov ecx, dword [eax + 0x18]
cmp ecx, 0xffffffff
je 0x59afdb
mov edx, dword [eax + 0x1c]
add ecx, ebp
cmp edx, ecx
mov dword [eax + 0x18], ecx
ja 0x59b1b8
mov ecx, edx
mov dword [eax + 0x18], ecx
jmp 0x59afdb
mov eax, dword [eax + 4]
push 1
push ebp
push eax
call fcn.006081d8
add esp, 0xc
jmp 0x59afdb
call fcn.0057e000
mov edi, dword [esp + 0x14]
lea ecx, [ecx]
mov eax, dword [esi]
cmp dword [eax + 0x14], 0
je 0x59b1ed
mov eax, dword [eax + 0x18]
jmp 0x59b1f9
mov ecx, dword [eax + 4]
push ecx
call fcn.00609413
add esp, 4
add eax, 7
cmp eax, edi
jae 0x59afdb
mov ecx, esi
call fcn.0059ad40
jmp 0x59b1e0