Function at 0x4052f0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x102c
call fcn.00407710
xor eax, eax
mov dword [ebp - 4], 0
push ebx
push esi
mov dword [ebp - 0x18], eax
xor esi, esi
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0x14]
mov bl, byte [eax]
test edi, edi
je 0x40533e
cmp dword [edi], esi
je 0x40533e
mov eax, edi
push str.HEADER
push dword [eax]
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
je 0x40533e
inc esi
cmp dword [edi + esi*4], 0
lea eax, [edi + esi*4]
jne 0x405323
push esi
push str.UnpackFiles:__d_file_s__will_be_unpacked.
call fcn.004045b0
mov ecx, dword [sym.imp.KERNEL32.dll_SetLastError]
add esp, 8
cmp dword [ebp + 0xc], 0xd
jb 0x40564d
mov eax, dword [ebp + 8]
mov edx, dword [eax + 5]
lea eax, [esi*4]
mov dword [ebp - 0xc], edx
mov dword [ebp - 0x28], eax
cmp edx, 0xffffffff
je 0x40564d
cmp edx, eax
jb 0x40564d
push edx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp + 0x14], eax
test eax, eax
jne 0x4053a9
mov esi, dword [sym.imp.KERNEL32.dll_SetLastError]
push 0xe
call esi
mov ebx, dword [ebp + 0x14]
jmp 0x405659
cmp bl, 0xe1
jb 0x4053c0
mov esi, dword [sym.imp.KERNEL32.dll_SetLastError]
push 0xd
call esi
mov ebx, dword [ebp + 0x14]
jmp 0x405659
mov dword [ebp - 0x1c], 0
cmp bl, 0x2d
jb 0x4053eb
movzx ecx, bl
mov eax, 0x6c16c16d
mul ecx
sub ecx, edx
shr ecx, 1
add ecx, edx
shr ecx, 5
movzx eax, cl
mov dword [ebp - 0x1c], eax
add bl, 0xd3
dec eax
jne 0x4053e5
xor ecx, ecx
mov dword [ebp - 0x20], ecx
cmp bl, 9
jb 0x405416
movzx ecx, bl
mov eax, 0x38e38e39
mul ecx
shr edx, 1
movzx eax, dl
mov ecx, eax
mov dword [ebp - 0x20], eax
lea esp, [esp]
add bl, 0xf7
dec eax
jne 0x405410
movzx eax, bl
mov dword [ebp - 0x24], eax
add ecx, eax
mov eax, 0x300
shl eax, cl
lea eax, [eax*2 + 0xe6c]
push eax
push 0
mov dword [ebp - 0x2c], eax
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x18], eax
test eax, eax
jne 0x405458
mov esi, dword [sym.imp.KERNEL32.dll_SetLastError]
push 0xe
call esi
mov ebx, dword [ebp + 0x14]
jmp 0x405659
push str.UnpackFiles:_Decompressing_archive...
call fcn.004045b0
mov ebx, dword [ebp + 0x14]
lea eax, [ebp - 8]
push eax
push dword [ebp - 0xc]
mov eax, dword [ebp + 0xc]
push ebx
add eax, 0xfffffff3
push eax
mov eax, dword [ebp + 8]
add eax, 0xd
push eax
push dword [ebp - 0x1c]
mov eax, dword [ebp - 0x18]
push dword [ebp - 0x20]
push dword [ebp - 0x24]
push dword [ebp - 0x2c]
push eax
call fcn.00404700
add esp, 0x2c
test eax, eax
jne 0x4054c5
mov ecx, dword [ebp - 0xc]
cmp dword [ebp - 8], ecx
jne 0x4054c5
mov eax, dword [ebx]
test eax, eax
jns 0x4054c1
cmp eax, 0x80000001
jne 0x4054c5
push dword [ebp + 0x10]
push ecx
push ebx
call fcn.00405110
add esp, 0xc
mov dword [ebp - 4], eax
jmp 0x405653
test esi, esi
jne 0x4054d4
mov esi, dword [sym.imp.KERNEL32.dll_SetLastError]
push 0xd
call esi
jmp 0x405659
mov edx, dword [ebp + 0x10]
mov dword [ebp + 8], 0
test esi, esi
je 0x4055f9
mov eax, ebx
lea ebx, [esi*4]
sub eax, edi
mov dword [ebp + 0xc], eax
mov eax, dword [eax + edi]
mov dword [ebp - 8], eax
add eax, ebx
cmp eax, ecx
ja 0x4053ae
mov byte [ebp - 0x102c], 0
test edx, edx
je 0x40551d
push edx
lea eax, [ebp - 0x102c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push dword [edi]
lea eax, [ebp - 0x102c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [ebp - 0x102c]
push eax
push str.UnpackFiles:_Unpacking_file:__s
call fcn.004045b0
add esp, 8
lea eax, [ebp - 0x102c]
push 0
push 0x8000080
push 2
push 0
push 1
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x10], eax
cmp eax, 0xffffffff
je 0x4055e2
push 0
lea ecx, [ebp - 0x14]
push ecx
push dword [ebp - 8]
mov ecx, dword [ebp + 0x14]
add ecx, ebx
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4055ba
mov eax, dword [ebp - 0x14]
cmp eax, dword [ebp - 8]
jne 0x4055ba
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp + 8]
add edi, 4
add ebx, dword [ebp - 8]
inc edx
mov ecx, dword [ebp - 0xc]
cmp edx, esi
mov eax, dword [ebp + 0xc]
mov dword [ebp + 8], edx
mov edx, dword [ebp + 0x10]
mov dword [ebp - 0x10], 0
jb 0x4054f4
jmp 0x4055fc
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
push eax
lea eax, [ebp - 0x102c]
push eax
push str.UnpackFiles:_WriteFile__s__failed._Error:__d
call fcn.004045b0
mov esi, dword [sym.imp.KERNEL32.dll_SetLastError]
add esp, 0xc
mov ebx, dword [ebp + 0x14]
jmp 0x40565f
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
push eax
lea eax, [ebp - 0x102c]
push eax
push str.UnpackFiles:_CreateFile__s__failed._Error:__d
jmp 0x4055cf
mov ebx, dword [ebp - 0x28]
lea eax, [ebx + 0x10]
cmp eax, ecx
jae 0x40562e
mov esi, dword [ebp + 0x14]
add esi, ebx
mov eax, dword [esi]
test eax, eax
jns 0x40562e
cmp eax, 0x80000001
jne 0x4053ae
push edx
sub ecx, ebx
push ecx
push esi
call fcn.00405110
mov ebx, dword [ebp + 0x14]
add esp, 0xc
mov dword [ebp - 4], eax
jmp 0x405653
mov esi, dword [sym.imp.KERNEL32.dll_SetLastError]
cmp ebx, ecx
jne 0x405644
mov ebx, dword [ebp + 0x14]
mov dword [ebp - 4], 1
jmp 0x405659
push 0xd
call esi
mov ebx, dword [ebp + 0x14]
jmp 0x405659
push 0xd
call ecx
xor ebx, ebx
mov esi, dword [sym.imp.KERNEL32.dll_SetLastError]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp dword [ebp - 4], 0
mov dword [ebp - 0x14], eax
jne 0x405678
push eax
push str.UnpackFiles:_Failed_to_unpack_files._Error:__d
call fcn.004045b0
add esp, 8
mov edi, dword [sym.imp.KERNEL32.dll_HeapFree]
test ebx, ebx
je 0x405692
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push 0
call ebx
push eax
call edi
jmp 0x405698
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x4056a7
push eax
push 0
call ebx
push eax
call edi
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x4056ba
cmp eax, 0xffffffff
je 0x4056ba
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x14]
call esi
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret