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

Disassembly:
push ebp
lea ebp, [esp - 0x58]
sub esp, 0x8c
mov eax, dword [ebp + 0x7c]
and dword [ebp + 0x68], 0xfffffff0
shr eax, 0x1e
and eax, 1
push ebx
mov dword [ebp - 0x24], eax
movsx eax, word [ebp + 0x7c]
push esi
xor esi, esi
cmp ax, si
push edi
mov dword [ebp + 0x7c], eax
mov dword [ebp + 0x1c], eax
jge 0x1004b372
neg eax
mov dword [ebp + 0x1c], eax
mov eax, dword [ebp + 0x68]
mov ecx, dword [ebp + 0x64]
lea eax, [eax + eax*2]
shl eax, 1
cdq
lea edi, [ecx + 0x100480]
lea ebx, [edi + 0xffc00]
mov dword [ebp + 0x50], eax
mov eax, dword [ebp + 0x6c]
or eax, dword [ebp + 0x70]
mov word [ecx + 0x100000], si
mov dword [ebp + 0x38], edi
mov dword [ebp + 0x4c], esi
mov dword [ebp + 0x3c], ebx
mov dword [ebx + 0x40], esi
mov dword [ebx + 0x44], esi
mov dword [ebx], esi
mov dword [ebx + 4], esi
mov dword [ebp + 0x54], edx
je 0x1004b3df
mov eax, dword [ecx]
mov dword [ebp + 0x2c], eax
mov eax, dword [ecx + 4]
mov dword [ebp + 0x30], eax
mov eax, dword [ebp + 0x68]
cdq
mov dword [ecx], esi
mov dword [ecx + 4], esi
mov ecx, eax
mov eax, dword [ebp + 0x2c]
sub eax, ecx
mov ecx, dword [ebp + 0x30]
sbb ecx, edx
add eax, dword [ebp + 0x6c]
adc ecx, dword [ebp + 0x70]
mov dword [ebp + 0x50], eax
mov dword [ebp + 0x54], ecx
push esi
push dword [ebp + 0x54]
push dword [ebp + 0x50]
push dword [ebp + 0x60]
call fcn.10040d01
add esp, 0x10
cmp eax, dword [ebp + 0x50]
jne 0x1004b42b
cmp edx, dword [ebp + 0x54]
jne 0x1004b42b
push esi
lea eax, [ebp + 0x4c]
push eax
push dword [ebp + 0x68]
push edi
push dword [ebp + 0x60]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp + 0x68]
cmp eax, dword [ebp + 0x4c]
jne 0x1004b61c
push 8
push edi
push str.PRIVHEAD
call dword [sym.imp.SHLWAPI.dll_StrCmpNA]
test eax, eax
je 0x1004b435
mov eax, 0xffffff00
jmp 0x1004bb59
push 0x40
lea eax, [edi + 0x30]
push eax
push ebx
call fcn.100144ff
mov eax, dword [ebp + 0x6c]
add esp, 0xc
or eax, dword [ebp + 0x70]
jne 0x1004b490
lea eax, [edi + 0x11b]
push 8
push eax
call fcn.10043934
mov dword [ebp + 0x74], eax
lea eax, [edi + 0x12b]
push 8
push eax
mov dword [ebp + 0x78], edx
call fcn.10043934
mov ecx, eax
mov eax, dword [ebp + 0x68]
add esp, 0x10
mov ebx, edx
cdq
push edx
add ecx, 1
push eax
adc ebx, esi
push ebx
push ecx
call fcn.100b4200
mov ebx, dword [ebp + 0x3c]
mov dword [ebp + 0x6c], eax
mov dword [ebp + 0x70], edx
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push esi
push dword [ebp + 0x70]
mov byte [ebp + 0x47], al
push dword [ebp + 0x6c]
push dword [ebp + 0x60]
call fcn.10040d01
add esp, 0x10
cmp eax, dword [ebp + 0x6c]
jne 0x1004b546
cmp edx, dword [ebp + 0x70]
jne 0x1004b546
push esi
lea eax, [ebp + 0x4c]
push eax
mov ebx, 0x2000
push ebx
push edi
push dword [ebp + 0x60]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [ebp + 0x4c], ebx
jne 0x1004b61c
xor eax, eax
cmp dword [edi], esi
mov dword [ebp + 8], esi
mov dword [ebp + 0x48], esi
mov ecx, edi
jne 0x1004b4f8
cmp eax, ebx
jge 0x1004b4f8
add ecx, dword [ebp + 0x68]
add eax, dword [ebp + 0x68]
cmp dword [ecx], esi
je 0x1004b4ea
mov eax, dword [ebp + 0x68]
cdq
add ecx, 0x2e
push 8
push ecx
mov dword [ebp], eax
mov dword [ebp + 4], edx
call fcn.10043934
pop ecx
pop ecx
push dword [ebp + 4]
sub eax, 1
push dword [ebp]
sbb edx, esi
push edx
push eax
call fcn.100b4200
mov ebx, eax
add ebx, dword [ebp + 0x6c]
push esi
adc edx, dword [ebp + 0x70]
mov dword [ebp - 8], ebx
push edx
push ebx
push dword [ebp + 0x60]
mov dword [ebp - 4], edx
call fcn.10040d01
add esp, 0x10
cmp eax, ebx
jne 0x1004b546
cmp edx, dword [ebp - 4]
je 0x1004b550
mov eax, 0xfffffeff
jmp 0x1004bb59
mov ebx, dword [ebp + 0x68]
push esi
lea eax, [ebp + 0x4c]
push eax
push ebx
push edi
push dword [ebp + 0x60]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp ebx, dword [ebp + 0x4c]
jne 0x1004b61c
lea eax, [edi + 8]
push 4
push eax
call fcn.10043934
cmp eax, esi
pop ecx
pop ecx
mov dword [ebp + 0x40], eax
jle 0x1004b61c
mov eax, 0xffc00
cdq
idiv dword [ebp + 0x40]
push 4
mov esi, eax
lea eax, [edi + 4]
push eax
call fcn.10043934
mov dword [ebp + 0x50], eax
mov dword [ebp + 0x54], edx
mov eax, esi
cdq
cmp dword [ebp + 0x54], edx
pop ecx
pop ecx
jl 0x1004b5b7
jg 0x1004b5b1
cmp dword [ebp + 0x50], eax
jbe 0x1004b5b7
mov dword [ebp + 0x50], eax
mov dword [ebp + 0x54], edx
mov ebx, dword [ebp + 0x50]
imul ebx, dword [ebp + 0x40]
lea eax, [edi + 0xc]
push 4
push eax
mov dword [ebp - 0x20], ebx
call fcn.10043934
mov esi, eax
add esi, dword [ebp - 8]
lea eax, [edi + 0x85]
adc edx, dword [ebp - 4]
push 4
push eax
mov dword [ebp + 0x2c], esi
mov dword [ebp + 0x30], edx
call fcn.10043934
push 0
push dword [ebp + 0x30]
mov dword [ebp + 0x10], eax
push esi
push dword [ebp + 0x60]
call fcn.10040d01
add esp, 0x20
cmp eax, esi
jne 0x1004b61c
cmp edx, dword [ebp + 0x30]
jne 0x1004b61c
xor esi, esi
push esi
lea eax, [ebp + 0x4c]
push eax
push ebx
push edi
push dword [ebp + 0x60]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp ebx, dword [ebp + 0x4c]
je 0x1004b624
or eax, 0xffffffff
jmp 0x1004bb59
cmp dword [ebp + 0x54], esi
mov dword [ebp + 0x28], esi
mov dword [ebp + 0x70], esi
mov dword [ebp + 0x68], esi
jl 0x1004b711
jg 0x1004b641
cmp dword [ebp + 0x50], esi
jbe 0x1004b711
add edi, 0x13
mov al, byte [edi]
cmp al, 0x34
mov edx, dword [ebp + 0x64]
jne 0x1004b6a1
movzx ebx, byte [edi + 5]
lea esi, [edi + 6]
push ebx
push esi
call fcn.10043934
mov dword [ebp - 0x10], eax
lea eax, [esi + ebx]
movsx esi, byte [ebp + 0x47]
pop ecx
pop ecx
movzx ecx, byte [eax]
lea ebx, [eax + ecx + 1]
movzx eax, byte [ebx]
inc ebx
cmp eax, esi
mov dword [ebp - 0xc], edx
mov dword [ebp + 0x24], eax
jl 0x1004b6f3
push esi
push ebx
push dword [ebp + 0x3c]
call dword [sym.imp.SHLWAPI.dll_StrCmpNIA]
test eax, eax
jne 0x1004b6f3
cmp esi, dword [ebp + 0x24]
je 0x1004b695
cmp byte [esi + ebx], al
jne 0x1004b6f3
mov eax, dword [ebp - 0x10]
cmp dword [ebp + 0x70], 0
mov dword [ebp + 0x28], eax
jmp 0x1004b6f1
cmp al, 0x35
jne 0x1004b6f3
movzx eax, byte [edi + 5]
lea ecx, [eax + edi + 6]
movzx eax, byte [ecx]
lea esi, [eax + 8]
mov word [edx + 0x100000], si
xor esi, esi
inc esi
cmp eax, esi
mov dword [ebp + 0x70], ecx
jl 0x1004b6d6
movzx bx, byte [esi + ecx]
mov word [edx + esi*2 + 0x100000], bx
inc esi
cmp esi, eax
jle 0x1004b6c4
push 0x10
lea eax, [edx + eax*2 + 0x100002]
push str.Volume
push eax
call fcn.100144ff
add esp, 0xc
cmp dword [ebp + 0x28], 0
jne 0x1004b711
inc dword [ebp + 0x68]
mov eax, dword [ebp + 0x68]
add edi, dword [ebp + 0x40]
cdq
cmp edx, dword [ebp + 0x54]
jl 0x1004b644
jg 0x1004b711
cmp eax, dword [ebp + 0x50]
jb 0x1004b644
xor eax, eax
cmp dword [ebp + 0x28], eax
mov dword [ebp - 0x18], eax
mov byte [ebp + 0x73], al
je 0x1004bb59
cmp dword [ebp + 0x10], eax
mov dword [ebp + 0x3c], eax
jle 0x1004bb33
mov eax, dword [ebp + 0x38]
mov esi, dword [ebp + 0x64]
add eax, 0x19
mov dword [ebp + 0x34], eax
add esi, 0x36
mov eax, dword [ebp + 0x3c]
cdq
cmp edx, dword [ebp + 0x54]
jg 0x1004baf2
jl 0x1004b755
cmp eax, dword [ebp + 0x50]
jae 0x1004baf2
mov eax, dword [ebp + 0x34]
cmp byte [eax - 6], 0x51
jne 0x1004badd
inc dword [ebp + 8]
push 0x10
lea eax, [esi - 0x16]
push 0
push eax
call fcn.100b40f0
mov ebx, dword [ebp + 0x34]
movzx edi, byte [ebx - 1]
push edi
push ebx
call fcn.10043934
and dword [ebp + 0x64], 0
add edi, ebx
movzx ebx, byte [edi]
add esp, 0x14
inc edi
cmp ebx, 6
mov dword [ebp - 0x30], eax
jle 0x1004b7b9
push 6
push edi
push 0x100cf468
call dword [sym.imp.SHLWAPI.dll_StrCmpNIA]
test eax, eax
jne 0x1004b7b9
lea eax, [ebx - 6]
push eax
lea eax, [edi + 6]
push eax
call fcn.1004b2f4
pop ecx
pop ecx
mov dword [ebp + 0x64], eax
add edi, ebx
movzx eax, byte [edi]
lea eax, [edi + eax + 1]
movzx ecx, byte [eax]
lea eax, [eax + ecx + 0x13]
mov dl, byte [eax]
mov cl, dl
and cl, 0x80
test dl, dl
mov dword [ebp + 0x24], eax
mov byte [ebp + 0x6b], cl
jns 0x1004b7e0
mov word [esi - 0x16], 0x100
add eax, 3
movzx ecx, byte [eax]
lea edi, [eax + ecx + 0x11]
movzx ebx, byte [edi]
and dword [esi - 0x26], 0
and dword [esi - 0x22], 0
inc edi
push ebx
push edi
call fcn.10043934
pop ecx
pop ecx
push dword [ebp + 4]
push dword [ebp]
push edx
push eax
call fcn.100b4200
mov dword [ebp - 0x10], eax
mov ax, word [ebp + 0x64]
mov word [esi - 0x14], ax
lea edi, [edi + ebx + 4]
movzx ax, byte [edi]
mov word [esi - 0x16], ax
mov eax, dword [ebp + 0x48]
inc edi
inc eax
push 4
push edi
mov dword [ebp - 0xc], edx
mov dword [ebp - 4], eax
mov dword [esi - 0x1e], eax
call fcn.10043934
lea ebx, [edi + 4]
push 2
push ebx
mov dword [esi - 6], eax
call fcn.10043934
inc ebx
inc ebx
push 2
push ebx
mov dword [esi - 2], eax
call fcn.10043934
push 8
mov dword [esi], eax
add ebx, 2
lea eax, [esi + 2]
push ebx
push eax
call fcn.100144ff
and dword [esi + 0xa], 0
and dword [esi + 0xe], 0
add edi, 0x10
add esp, 0x24
cmp byte [edi], 0
jbe 0x1004b883
movzx eax, byte [edi + 1]
cdq
mov dword [esi + 0xa], eax
mov dword [esi + 0xe], edx
xor eax, eax
cmp dword [ebp + 0x54], eax
mov dword [esi - 0x2e], eax
mov dword [esi - 0x2a], eax
mov dword [ebp + 0x14], eax
jl 0x1004badd
jg 0x1004b8a2
cmp dword [ebp + 0x50], eax
jbe 0x1004badd
mov edi, dword [ebp + 0x38]
mov dword [ebp - 0x14], edi
cmp byte [edi + 0x13], 0x32
jne 0x1004b9da
movzx ebx, byte [edi + 0x18]
movzx eax, byte [edi + ebx + 0x19]
add eax, edi
add eax, ebx
movzx ecx, byte [eax + 0x38]
push ecx
add eax, 0x39
push eax
call fcn.10043934
cmp dword [ebp - 0x30], eax
pop ecx
pop ecx
jne 0x1004b9da
push ebx
add edi, 0x19
push edi
call fcn.10043934
and dword [ebp + 0xc], 0
and dword [ebp + 0x64], 0
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp + 0x38]
pop ecx
pop ecx
mov dword [ebp + 0x20], eax
mov eax, dword [ebp + 0x20]
cmp byte [eax + 0x13], 0x33
jne 0x1004b9b6
mov ecx, eax
movzx edi, byte [ecx + 0x18]
lea eax, [ecx + edi]
movzx edx, byte [eax + 0x19]
lea ebx, [ecx + edx]
movzx ebx, byte [ebx + edi + 0x36]
add ebx, edx
add ecx, ebx
add ecx, edi
mov dword [ebp - 0x1c], edx
movzx edx, byte [ecx + 0x37]
push edx
add ecx, 0x38
add eax, 0x1a
push ecx
mov dword [ebp + 0x18], edx
mov dword [ebp - 0x28], eax
call fcn.10043934
mov edx, dword [ebp + 0x18]
pop ecx
pop ecx
mov ecx, dword [ebp + 0x64]
add ecx, edx
mov edx, dword [ebp + 0x38]
add ecx, ebx
add ecx, edi
cmp dword [ebp - 0x2c], eax
lea ecx, [ecx + edx + 0x38]
mov dword [ebp - 0x34], ecx
jne 0x1004b9b6
mov ecx, dword [ebp - 0x1c]
mov eax, dword [ebp + 0x64]
add eax, ecx
add eax, edi
mov ecx, edx
lea edi, [eax + ecx]
lea eax, [edi + 0x2e]
push 8
push eax
call fcn.10043934
mov ebx, eax
mov eax, edx
push 8
add edi, 0x26
push edi
mov dword [ebp + 0x18], eax
call fcn.10043934
add esp, 0x10
push dword [ebp + 4]
add ebx, eax
mov eax, dword [ebp + 0x18]
push dword [ebp]
adc eax, edx
add ebx, dword [ebp + 0x74]
adc eax, dword [ebp + 0x78]
push eax
push ebx
call fcn.100b4200
mov edi, eax
mov eax, dword [ebp - 0x34]
movzx ecx, byte [eax]
push ecx
inc eax
push eax
mov ebx, edx
call fcn.10043934
cmp dword [ebp + 0x28], eax
pop ecx
pop ecx
je 0x1004ba07
mov eax, dword [ebp + 0x40]
inc dword [ebp + 0xc]
add dword [ebp + 0x64], eax
add dword [ebp + 0x20], eax
mov eax, dword [ebp + 0xc]
cdq
cmp edx, dword [ebp + 0x54]
jl 0x1004b8f5
jg 0x1004b9da
cmp eax, dword [ebp + 0x50]
jb 0x1004b8f5
inc dword [ebp + 0x14]
mov edi, dword [ebp - 0x14]
mov eax, dword [ebp + 0x14]
add edi, dword [ebp + 0x40]
cdq
cmp edx, dword [ebp + 0x54]
mov dword [ebp - 0x14], edi
jl 0x1004b8a8
jg 0x1004badd
cmp eax, dword [ebp + 0x50]
jb 0x1004b8a8
jmp 0x1004badd
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x1c]
mov dword [esi - 0x2a], ebx
lea ebx, [eax + ecx]
cmp eax, ebx
mov dword [esi - 0x2e], edi
mov edi, eax
jae 0x1004bacc
xor edx, edx
cmp byte [edi], 0x2d
jne 0x1004bac3
inc edi
xor ecx, ecx
cmp edi, ebx
jae 0x1004ba54
xor edx, edx
mov dl, byte [edi]
push edx
call fcn.10045b9f
add esp, 4
test al, al
je 0x1004ba52
lea eax, [ecx + ecx*4]
movsx ecx, dl
inc edi
cmp edi, ebx
lea ecx, [ecx + eax*2 - 0x30]
jb 0x1004ba32
xor edx, edx
cmp ecx, edx
mov eax, dword [ebp - 0x10]
mov dword [esi - 0x26], eax
mov eax, dword [ebp - 0xc]
mov dword [esi - 0x1e], ecx
mov dword [esi - 0x22], eax
jle 0x1004bac3
movsx eax, word [ebp + 0x1c]
cmp eax, ecx
jne 0x1004baad
cmp dword [ebp + 0x7c], edx
jle 0x1004ba7d
cmp byte [ebp + 0x6b], 0
je 0x1004ba85
cmp dword [ebp + 0x7c], edx
jge 0x1004bac3
cmp byte [ebp + 0x6b], 0
je 0x1004bac3
cmp word [ebp + 0x1c], dx
jle 0x1004ba92
mov eax, 0x80
jmp 0x1004ba94
xor eax, eax
cmp dword [ebp - 0x18], edx
mov ecx, dword [ebp + 0x24]
mov byte [ecx], al
mov byte [ebp + 0x73], 1
jne 0x1004bac3
mov eax, dword [ebp + 0x34]
add eax, 0xffffffe7
mov dword [ebp - 0x18], eax
jmp 0x1004bac3
cmp dword [ebp - 0x24], edx
je 0x1004bac3
cmp dword [ebp + 0x7c], edx
jle 0x1004bac3
cmp byte [ebp + 0x6b], 0
je 0x1004bac3
mov eax, dword [ebp + 0x24]
mov byte [eax], 0
inc edi
cmp edi, ebx
jb 0x1004ba22
mov eax, dword [ebp - 4]
add esi, 0x90
cmp eax, dword [ebp + 0x10]
mov dword [ebp + 0x48], eax
jge 0x1004baf2
mov eax, dword [ebp + 0x40]
add dword [ebp + 0x34], eax
mov eax, dword [ebp + 0x10]
inc dword [ebp + 0x3c]
cmp dword [ebp + 8], eax
jl 0x1004b73d
cmp byte [ebp + 0x73], 0
je 0x1004bb33
push 0
push dword [ebp + 0x30]
push dword [ebp + 0x2c]
push dword [ebp + 0x60]
call fcn.10040d01
add esp, 0x10
cmp eax, dword [ebp + 0x2c]
jne 0x1004bb30
cmp edx, dword [ebp + 0x30]
jne 0x1004bb30
mov esi, dword [ebp - 0x20]
push 0
lea eax, [ebp + 0x4c]
push eax
push esi
push dword [ebp + 0x38]
push dword [ebp + 0x60]
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp esi, dword [ebp + 0x4c]
je 0x1004bb33
neg dword [ebp + 0x48]
cmp byte [0x100e2e70], 0
je 0x1004bb56
push dword [ebp + 0x48]
push 0x39b1
push str._d:__nPart_d_r_n
push 0x100e3108
call fcn.10011029
add esp, 0x10
mov eax, dword [ebp + 0x48]
pop edi
pop esi
pop ebx
add ebp, 0x58
leave
ret