Function at 0x470d80
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xe0
mov eax, dword [0x58e5a4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, ecx
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x24], ecx
cmp ecx, 0xffffffff
jne 0x470dbd
push 6
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004d2a60
mov esp, ebp
pop ebp
ret 4
push ebx
push esi
mov esi, dword [eax + 0x400]
xor ebx, ebx
push edi
xor edi, edi
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x34], esi
test esi, esi
je 0x470f1a
mov ecx, dword [esi + 0x20]
mov edx, ecx
lea esi, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x470df8
sub edx, esi
inc edi
mov esi, dword [ebp - 0x34]
add edi, edx
mov eax, edi
and eax, 1
add edi, eax
cmp dword [esi + 4], 0
je 0x470e21
mov dword [ebp - 0x44], 1
inc ebx
jmp 0x470f03
mov eax, dword [ebp - 0x44]
test eax, eax
jne 0x470e6d
mov eax, dword [esi + 0x1c]
cmp ecx, eax
je 0x470e6a
test ecx, ecx
je 0x470e60
test eax, eax
je 0x470e60
mov dl, byte [ecx]
cmp dl, byte [eax]
jne 0x470e57
test dl, dl
je 0x470e53
mov dl, byte [ecx + 1]
cmp dl, byte [eax + 1]
jne 0x470e57
add ecx, 2
add eax, 2
test dl, dl
jne 0x470e37
xor eax, eax
jmp 0x470e5c
sbb eax, eax
or eax, 1
test eax, eax
je 0x470e6a
mov eax, 1
mov dword [ebp - 0x44], eax
jmp 0x470e6d
mov eax, dword [ebp - 0x44]
mov ebx, dword [esi + 0xc]
test ebx, ebx
je 0x470f00
mov esi, dword [esi + 8]
add esi, 0x10
add dword [ebp - 0x28], ebx
jmp 0x470e86
mov eax, dword [ebp - 0x44]
test eax, eax
jne 0x470ed0
mov ecx, dword [esi - 4]
mov eax, dword [esi]
cmp eax, ecx
je 0x470ed0
test eax, eax
je 0x470ec9
test ecx, ecx
je 0x470ec9
nop dword [eax + eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x470ec0
test dl, dl
je 0x470ebc
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x470ec0
add eax, 2
add ecx, 2
test dl, dl
jne 0x470ea0
xor eax, eax
jmp 0x470ec5
sbb eax, eax
or eax, 1
test eax, eax
je 0x470ed0
mov dword [ebp - 0x44], 1
mov ecx, dword [esi]
test ecx, ecx
je 0x470ef5
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x470ee0
sub ecx, edx
add edi, 3
add edi, ecx
mov eax, edi
and eax, 1
add edi, eax
add esi, 0x14
sub ebx, 1
jne 0x470e83
mov esi, dword [ebp - 0x34]
mov ebx, dword [ebp - 0x28]
mov esi, dword [esi]
inc ebx
inc dword [ebp - 0x30]
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x34], esi
test esi, esi
jne 0x470df0
mov ecx, dword [ebp - 0x24]
push 0
push 0
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x470fbf
mov esi, dword [ebp - 0x2c]
lea eax, [ebp - 0x38]
push 0
push eax
mov dword [ebp - 0x38], 0
push dword [esi + 0xac]
push dword [esi + 0xc]
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x470fbf
cmp dword [ebp - 0x44], 0
jne 0x470fd4
mov eax, dword [esi + 4]
cmp dword [eax + 4], 0
jne 0x470fd4
cmp dword [esi + 0x3d0], 0
je 0x47103a
movzx eax, word [esi + 0x6c]
mov ecx, dword [esi + 0x3d4]
add eax, 0x18
push 0
push 0
add eax, ecx
mov dword [esi + 0x3dc], ecx
push 0
push dword [ebp - 0x24]
mov dword [esi + 0x3e0], eax
mov eax, dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [esi + 0x54], ecx
call eax
cmp eax, 0xffffffff
je 0x470fbf
push dword [esi + 0x3d4]
mov ecx, esi
push dword [esi + 0x3d0]
push dword [ebp - 0x24]
call fcn.0046f7a0
test eax, eax
jne 0x47103a
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004d2a60
mov esp, ebp
pop ebp
ret 4
movzx eax, word [esi + 0x6c]
push 0
push 0
add eax, 0x68
mov dword [esi + 0x3dc], 0x50
push 0
push dword [ebp - 0x24]
mov dword [esi + 0x3e0], eax
mov eax, dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [esi + 0x54], 0x50
call eax
cmp eax, 0xffffffff
je 0x470fbf
push 0
lea eax, [ebp - 0x54]
push eax
push 0x40
lea eax, [esi + 0x18]
push eax
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x470fbf
push 0
lea eax, [ebp - 0x54]
push eax
push 0x10
push 0x58e134
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x470fbf
mov eax, dword [esi + 0xac]
mov ecx, esi
push dword [ebp - 0x24]
mov dword [esi + 0x10], eax
mov dword [esi + 0x14], 0
call fcn.0046f410
test eax, eax
je 0x470fbf
movzx eax, word [esi + 0x5e]
xor ecx, ecx
mov dword [ebp - 0x58], 0
mov edx, eax
cmp cx, ax
jae 0x471146
mov ebx, dword [ebp - 0x2c]
add esi, 0x160
nop dword [eax]
cmp dword [esi], 0
je 0x4710c5
push 0
push 0
push dword [esi + 4]
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x470fbf
mov eax, dword [ebx + 0xc]
lea ecx, [ebp - 0x38]
add eax, dword [esi + 4]
push 0
push ecx
push dword [esi]
mov dword [ebp - 0x38], 0
push eax
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x470fbf
mov eax, dword [esi + 4]
add eax, dword [esi]
mov edx, dword [ebx + 0x10]
cmp eax, edx
mov ecx, dword [ebx + 0x14]
cmova edx, eax
mov dword [ebp - 0x38], ecx
mov dword [ebx + 0x10], edx
mov ebx, dword [esi - 8]
test ebx, ebx
jne 0x4710f7
mov eax, dword [ebp - 0x2c]
mov ebx, dword [esi]
dec ebx
mov ecx, dword [eax + 0x90]
add ebx, ecx
neg ecx
and ebx, ecx
mov ecx, dword [ebp - 0x38]
mov eax, dword [esi - 4]
push dword [ebp - 0x24]
add eax, ebx
mov ebx, dword [ebp - 0x2c]
cmp eax, ecx
cmova ecx, eax
mov eax, dword [ebx + 0x3e4]
cmp edx, eax
mov dword [ebx + 0x14], ecx
mov ecx, ebx
cmova eax, edx
mov dword [ebx + 0x3e4], eax
call fcn.0046f410
test eax, eax
je 0x470fbf
mov ecx, dword [ebp - 0x58]
add esi, 0x28
movzx edx, word [ebx + 0x5e]
inc ecx
mov dword [ebp - 0x58], ecx
cmp ecx, edx
jb 0x471080
mov ebx, dword [ebp - 0x28]
mov esi, dword [ebp - 0x2c]
cmp dword [ebp - 0x44], 0
jne 0x471159
mov eax, dword [esi + 4]
cmp dword [eax + 4], 0
je 0x471833
cmp dx, 0x10
jb 0x47116f
push 0xc0
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x470fbf
movzx ecx, dx
lea eax, [edx + 1]
mov word [esi + 0x5e], ax
xorps xmm0, xmm0
movlpd qword [ebp - 0xb0], xmm0
movlpd qword [ebp - 0xa8], xmm0
lea eax, [ecx + ecx*4]
mov dword [ebp - 0xe0], 0x40
mov ecx, dword [ebp - 0x2c]
lea eax, [esi + eax*8]
lea esi, [eax + 0x150]
mov dword [ebp - 0x78], eax
movups xmmword [esi], xmm0
mov dword [ebp - 0xdc], 0x727444
movups xmmword [esi + 0x10], xmm0
movq qword [esi + 0x20], xmm0
mov eax, dword [ecx + 0xd8]
mov dword [ebp - 0xd0], eax
mov eax, dword [ecx + 0xdc]
mov dword [ebp - 0xcc], eax
mov eax, dword [ecx + 0x128]
mov dword [ebp - 0xc8], eax
mov eax, dword [ecx + 0x12c]
mov dword [ebp - 0xc4], eax
mov eax, dword [ecx + 0x130]
mov dword [ebp - 0xc0], eax
mov eax, dword [ecx + 0x134]
mov dword [ebp - 0xbc], eax
mov eax, dword [ecx + 0xa8]
mov dword [ebp - 0xb8], eax
mov eax, dword [ecx + 0x140]
test eax, eax
je 0x47123f
cmp dword [ecx + 0x144], 0
je 0x47123f
push eax
call fcn.00470aa0
test eax, eax
je 0x47123f
movups xmm0, xmmword [eax]
mov eax, dword [eax + 0x10]
mov dword [ebp - 0xb0], eax
movups xmmword [ebp - 0x18], xmm0
mov edx, str..detour
mov ecx, 8
sub edx, esi
nop dword [eax + eax]
lea eax, [ecx + 0x7ffffff6]
test eax, eax
je 0x471269
mov al, byte [esi + edx]
test al, al
je 0x471269
mov byte [esi], al
inc esi
sub ecx, 1
jne 0x471250
test ecx, ecx
lea eax, [esi - 1]
cmovne eax, esi
mov byte [eax], 0
je 0x470fbf
mov edx, dword [ebp - 0x2c]
lea ecx, [ebx*4 + 7]
mov eax, dword [ebp - 0x78]
and ecx, 0xfffffff8
mov ebx, dword [ebp - 0x2c]
mov dword [ebp - 0x38], 0
mov dword [eax + 0x174], 0xc0000040
mov eax, dword [edx + 0x14]
mov dword [edx + 0x3ec], eax
mov eax, dword [edx + 0x10]
mov dword [edx + 0x3f4], eax
mov eax, dword [ebp - 0x30]
mov esi, dword [edx + 0x3d4]
mov dword [edx + 0x3f0], 0
mov dword [ebp - 0xb4], esi
lea eax, [eax + eax*4]
add eax, 5
shl eax, 2
mov dword [ebp - 0x58], eax
mov eax, dword [edx + 4]
lea edx, [edi + 7]
and edx, 0xfffffff8
add edx, esi
mov eax, dword [eax + 4]
add eax, 7
and eax, 0xfffffff8
add eax, 0x40
lea ecx, [eax + ecx*2]
mov eax, dword [ebp - 0x58]
add eax, 7
add edx, ecx
and eax, 0xfffffff8
mov ecx, ebx
add eax, edx
push eax
call fcn.00470c60
test eax, eax
je 0x470fbf
lea eax, [ebp - 0x30]
mov dword [ebp - 0x30], 0
push eax
push 0x40
mov ecx, ebx
mov dword [ebp - 0x34], 0
call fcn.0046f500
mov esi, eax
test esi, esi
je 0x470fbf
lea eax, [ebp - 0x70]
mov ecx, ebx
push eax
push dword [ebx + 0x3d4]
call fcn.0046f500
mov ebx, eax
test ebx, ebx
je 0x470fbf
lea eax, [ebp - 0x70]
push eax
push dword [ebp - 0x28]
lea ecx, [ebp - 0x8c]
push dword [ebp - 0x2c]
call fcn.0046f0a0
lea eax, [ebp - 0x70]
push eax
push dword [ebp - 0x28]
lea ecx, [ebp - 0x18]
push dword [ebp - 0x2c]
call fcn.0046f0a0
lea eax, [ebp - 0x90]
mov dword [ebp - 0x94], edi
push eax
push edi
mov edi, dword [ebp - 0x2c]
mov ecx, edi
mov dword [ebp - 0x98], 0
call fcn.0046f500
mov ecx, dword [edi + 4]
mov dword [ebp - 0x48], eax
lea eax, [ebp - 0x34]
push eax
push dword [ecx + 4]
mov ecx, edi
call fcn.0046f500
mov edi, eax
test edi, edi
je 0x470fbf
mov eax, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x34]
sub edx, dword [ebp - 0x30]
mov dword [ebp - 0xd8], edx
mov ecx, dword [eax + 4]
mov ecx, dword [ecx + 4]
add ecx, edx
mov dword [ebp - 0xd4], ecx
movups xmm0, xmmword [ebp - 0xe0]
movups xmmword [esi], xmm0
movups xmm0, xmmword [ebp - 0xd0]
movups xmmword [esi + 0x10], xmm0
movups xmm0, xmmword [ebp - 0xc0]
movups xmmword [esi + 0x20], xmm0
movups xmm0, xmmword [ebp - 0xb0]
movups xmmword [esi + 0x30], xmm0
mov esi, eax
push dword [esi + 0x3d4]
mov eax, dword [esi + 0x3d0]
add eax, dword [esi + 0xc]
push eax
push ebx
call fcn.004d4210
mov eax, dword [esi + 4]
push dword [eax + 4]
push dword [eax]
push edi
call fcn.004d4210
add esp, 0x18
lea eax, [ebp - 0x38]
mov ecx, esi
push eax
push dword [ebp - 0x58]
call fcn.0046f500
mov ecx, eax
mov dword [ebp - 0x50], ecx
test ecx, ecx
je 0x470fbf
mov edi, dword [esi + 0x400]
mov dword [ebp - 0x34], edi
test edi, edi
je 0x471759
mov eax, dword [ebp - 0x7c]
mov esi, ecx
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x84]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x88]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 8]
mov dword [ebp - 0x60], eax
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x5c], eax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x64], eax
mov eax, dword [ebp - 0x90]
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp - 0x98]
mov dword [ebp - 0x68], eax
nop
xorps xmm0, xmm0
movups xmmword [esi], xmm0
mov dword [esi + 0x10], 0
mov edi, dword [edi + 0x20]
mov ecx, edi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4714a5
mov esi, dword [ebp - 0x68]
sub ecx, edx
lea ebx, [ecx + 1]
mov eax, ebx
and eax, 1
add ebx, eax
mov eax, dword [ebp - 0x94]
add esi, ebx
mov dword [ebp - 0x6c], esi
cmp esi, eax
ja 0x47152d
mov ecx, dword [ebp - 0x50]
mov edx, dword [ebp - 0x4c]
mov dword [ecx + 0xc], edx
test eax, eax
je 0x47152d
cmp eax, 0x7fffffff
ja 0x471523
mov edx, eax
mov eax, dword [ebp - 0x48]
mov ecx, eax
test edx, edx
je 0x47150b
mov esi, SysReAllocString
sub esi, edx
sub edi, eax
lea eax, [esi + edx]
test eax, eax
je 0x471508
mov al, byte [ecx + edi]
test al, al
je 0x471508
mov byte [ecx], al
inc ecx
sub edx, 1
jne 0x4714f2
mov esi, dword [ebp - 0x6c]
test edx, edx
lea eax, [ecx - 1]
cmovne eax, ecx
mov byte [eax], 0
je 0x47152d
add dword [ebp - 0x48], ebx
add dword [ebp - 0x4c], ebx
mov dword [ebp - 0x68], esi
jmp 0x47152d
test eax, eax
je 0x47152d
mov eax, dword [ebp - 0x48]
mov byte [eax], 0
mov esi, dword [ebp - 0x50]
mov edi, dword [ebp - 0x34]
mov dword [esi + 4], 0
mov eax, dword [edi + 0x18]
mov dword [esi + 8], eax
cmp dword [edi + 4], 0
je 0x4715f1
mov eax, dword [ebp - 0x3c]
mov ebx, dword [ebp - 0x80]
mov edx, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x28]
cmp eax, ebx
jae 0x471574
mov dword [esi], edx
inc eax
add edx, 4
mov dword [ecx], SysReAllocString
add ecx, 4
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x40], edx
mov dword [ebp - 0x28], ecx
jmp 0x47157a
mov dword [esi], 0
mov eax, dword [ebp - 0xc]
cmp dword [ebp - 0x5c], eax
jae 0x4715a5
mov edi, dword [ebp - 0x60]
inc dword [ebp - 0x5c]
mov dword [esi + 0x10], edi
add edi, 4
mov dword [ebp - 0x60], edi
mov edi, dword [ebp - 0x64]
mov dword [edi], SysReAllocString
add edi, 4
mov dword [ebp - 0x64], edi
mov edi, dword [ebp - 0x34]
jmp 0x4715ac
mov dword [esi + 0x10], 0
mov eax, dword [ebp - 0x3c]
cmp eax, ebx
jae 0x4715c9
inc eax
mov dword [ecx], 0
add edx, 4
mov dword [ebp - 0x3c], eax
add ecx, 4
mov dword [ebp - 0x40], edx
mov dword [ebp - 0x28], ecx
mov ebx, dword [ebp - 0x5c]
cmp ebx, dword [ebp - 0xc]
jae 0x471740
add dword [ebp - 0x60], 4
inc ebx
mov dword [ebp - 0x5c], ebx
mov ebx, dword [ebp - 0x64]
mov dword [ebx], 0
add ebx, 4
mov dword [ebp - 0x64], ebx
jmp 0x471740
mov eax, dword [edi + 0x14]
mov ebx, dword [ebp - 0x40]
mov dword [esi + 0x10], eax
mov eax, 1
cmp eax, dword [ebp - 0x80]
mov dword [ebp - 0x74], 0
sbb eax, eax
and eax, ebx
mov dword [esi], eax
cmp dword [edi + 0xc], 0
jbe 0x47171f
xor ecx, ecx
mov dword [ebp - 0x6c], ecx
nop
mov edx, dword [edi + 8]
mov edi, dword [edx + ecx + 0x10]
add edx, ecx
test edi, edi
je 0x4716db
mov ecx, edi
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x471636
sub ecx, esi
mov esi, dword [ebp - 0x68]
lea ebx, [ecx + 3]
mov eax, ebx
and eax, 1
add ebx, eax
add esi, ebx
mov dword [ebp - 0x70], esi
cmp esi, dword [ebp - 0x94]
jbe 0x47165d
xor eax, eax
jmp 0x4716ce
mov eax, dword [ebp - 0x4c]
mov dword [ebp - 0x30], eax
mov ax, word [edx]
mov edx, dword [ebp - 0x48]
mov word [edx], ax
lea ecx, [edx + 2]
mov eax, dword [ebp - 0x94]
test eax, eax
je 0x4716cb
cmp eax, 0x7fffffff
ja 0x4716c4
mov edx, eax
test edx, edx
je 0x4716a9
mov esi, SysReAllocString
sub esi, edx
sub edi, ecx
nop
lea eax, [edx + esi]
test eax, eax
je 0x4716a6
mov al, byte [ecx + edi]
test al, al
je 0x4716a6
mov byte [ecx], al
inc ecx
sub edx, 1
jne 0x471690
mov esi, dword [ebp - 0x70]
test edx, edx
lea eax, [ecx - 1]
cmovne eax, ecx
mov byte [eax], 0
mov eax, dword [ebp - 0x30]
je 0x4716ce
add dword [ebp - 0x48], ebx
add dword [ebp - 0x4c], ebx
mov dword [ebp - 0x68], esi
jmp 0x4716ce
test eax, eax
je 0x4716cb
mov byte [ecx], 0
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x3c]
mov ebx, dword [ebp - 0x40]
cmp ecx, dword [ebp - 0x80]
jae 0x471700
jmp 0x4716eb
mov ecx, dword [ebp - 0x3c]
cmp ecx, dword [ebp - 0x80]
jae 0x471700
mov eax, dword [edx + 8]
sub eax, 0x80000000
inc ecx
add ebx, 4
mov dword [ebp - 0x3c], ecx
mov ecx, dword [ebp - 0x28]
mov dword [ebp - 0x40], ebx
mov dword [ecx], eax
add ecx, 4
mov dword [ebp - 0x28], ecx
mov edx, dword [ebp - 0x74]
mov edi, dword [ebp - 0x34]
inc edx
mov ecx, dword [ebp - 0x6c]
add ecx, 0x14
mov dword [ebp - 0x74], edx
mov dword [ebp - 0x6c], ecx
cmp edx, dword [edi + 0xc]
jb 0x471620
mov esi, dword [ebp - 0x50]
mov eax, dword [ebp - 0x3c]
cmp eax, dword [ebp - 0x80]
jae 0x471740
inc eax
add ebx, 4
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x40], ebx
mov dword [eax], 0
add eax, 4
mov dword [ebp - 0x28], eax
mov edi, dword [edi]
add esi, 0x14
mov dword [ebp - 0x50], esi
mov dword [ebp - 0x34], edi
test edi, edi
jne 0x471490
mov esi, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x50]
mov edi, dword [ebp - 0x24]
xorps xmm0, xmm0
movups xmmword [ecx], xmm0
mov dword [ecx + 0x10], 0
mov ecx, dword [esi + 0x94]
mov eax, dword [esi + 0x3f0]
dec ecx
add dword [esi + 0x14], eax
add eax, ecx
not ecx
and eax, ecx
mov ecx, esi
add dword [esi + 0x10], eax
push edi
call fcn.0046f410
test eax, eax
je 0x470fbf
mov ebx, dword [ebp - 0x78]
mov eax, dword [esi + 0x3ec]
push 0
push 0
mov dword [ebx + 0x15c], eax
mov eax, dword [esi + 0x3f0]
mov dword [ebx + 0x158], eax
mov eax, dword [esi + 0x3f4]
mov dword [ebx + 0x164], eax
mov eax, dword [esi + 0x3f0]
mov ecx, dword [esi + 0x94]
dec eax
add eax, ecx
neg ecx
and eax, ecx
mov dword [ebx + 0x160], eax
mov eax, dword [ebp - 0x38]
mov dword [esi + 0xd8], eax
mov eax, dword [ebp - 0x58]
mov dword [esi + 0xdc], eax
mov dword [esi + 0x128], 0
mov dword [esi + 0x12c], 0
push dword [ebx + 0x164]
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x470fbf
push 0
lea eax, [ebp - 0x54]
push eax
push dword [ebx + 0x160]
push dword [esi + 0x3f8]
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x470fbf
mov edi, dword [esi + 0x10]
xor ecx, ecx
mov eax, dword [esi + 0x3e4]
xor edx, edx
sub edi, eax
cmp cx, word [esi + 0x5e]
jae 0x471890
lea ecx, [esi + 0x168]
nop
mov eax, dword [ecx - 4]
cmp eax, dword [esi + 0x3e4]
jbe 0x471860
add eax, edi
mov dword [ecx - 4], eax
mov eax, dword [ecx]
cmp eax, dword [esi + 0x3e4]
jbe 0x47186e
add eax, edi
mov dword [ecx], eax
mov eax, dword [ecx + 4]
cmp eax, dword [esi + 0x3e4]
jbe 0x47187e
add eax, edi
mov dword [ecx + 4], eax
movzx eax, word [esi + 0x5e]
inc edx
add ecx, 0x28
cmp edx, eax
jb 0x471850
mov eax, dword [esi + 0x3e4]
mov ecx, dword [esi + 0x64]
cmp ecx, eax
jbe 0x47189d
lea eax, [edi + ecx]
mov dword [esi + 0x64], eax
mov eax, dword [esi + 0x14]
mov dword [esi + 0xb0], 0
mov dword [esi + 0xa8], eax
mov esi, dword [esi + 0x100]
test esi, esi
je 0x471972
mov eax, dword [ebp - 0x2c]
mov ebx, dword [eax + 0x104]
test ebx, ebx
je 0x471972
push esi
mov ecx, eax
call fcn.00470a40
push 0
push 0
push eax
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x470fbf
mov ecx, dword [ebp - 0x2c]
push esi
call fcn.00470aa0
mov esi, eax
test esi, esi
je 0x470fbf
mov eax, 0x24924925
mov dword [ebp - 0x38], 0
mul ebx
sub ebx, edx
shr ebx, 1
add ebx, edx
shr ebx, 4
test ebx, ebx
je 0x471972
nop dword [eax]
movups xmm0, xmmword [esi]
mov ecx, dword [ebp - 0x2c]
mov eax, dword [esi + 0x18]
movups xmmword [ebp - 0x20], xmm0
mov dword [ebp - 8], eax
movq xmm0, qword [esi + 0x10]
movq qword [ebp - 0x10], xmm0
cmp eax, dword [ecx + 0x3e4]
jbe 0x471947
add eax, edi
mov dword [ebp - 8], eax
push 0
lea eax, [ebp - 0x54]
push eax
push 0x1c
lea eax, [ebp - 0x20]
push eax
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x470fbf
mov ecx, dword [ebp - 0x38]
add esi, 0x1c
inc ecx
mov dword [ebp - 0x38], ecx
cmp ecx, ebx
jb 0x471920
mov ebx, dword [ebp - 0x2c]
mov esi, dword [ebx + 0x140]
test esi, esi
je 0x4719f0
cmp dword [ebx + 0x144], 0
je 0x4719f0
cmp dword [ebp - 0x44], 0
je 0x4719f0
push esi
mov ecx, ebx
call fcn.00470a40
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
push 0
push eax
push dword [ebp - 0x24]
call edi
cmp eax, 0xffffffff
je 0x470fbf
push esi
mov ecx, ebx
call fcn.00470aa0
test eax, eax
je 0x470fbf
movups xmm0, xmmword [eax]
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
movups xmmword [ebp - 0x18], xmm0
mov eax, dword [eax + 0x10]
and eax, 0xfffffffe
mov dword [ebp - 8], eax
lea eax, [ebp - 0x54]
push eax
push 0x14
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 0x24]
call esi
test eax, eax
je 0x470fbf
jmp 0x4719fc
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [ebx + 0x3e8]
cmp eax, dword [ebx + 0x3e4]
jbe 0x471a41
push 0
push 0
push dword [ebx + 0x10]
push dword [ebp - 0x24]
call edi
cmp eax, 0xffffffff
je 0x470fbf
mov ecx, dword [ebx + 0x3e4]
mov eax, dword [ebx + 0x3e8]
sub eax, ecx
push eax
push ecx
push dword [ebp - 0x24]
mov ecx, ebx
call fcn.0046f7a0
test eax, eax
je 0x470fbf
push 0
push 0
push dword [ebx + 0x3dc]
push dword [ebp - 0x24]
call edi
cmp eax, 0xffffffff
je 0x470fbf
push 0
lea eax, [ebp - 0x54]
push eax
push 0xf8
lea eax, [ebx + 0x58]
push eax
push dword [ebp - 0x24]
call esi
test eax, eax
je 0x470fbf
push 0
push 0
push dword [ebx + 0x3e0]
push dword [ebp - 0x24]
call edi
cmp eax, 0xffffffff
je 0x470fbf
movzx eax, word [ebx + 0x5e]
lea ecx, [ebp - 0x54]
push 0
push ecx
lea eax, [eax + eax*4]
shl eax, 3
push eax
lea eax, [ebx + 0x150]
push eax
push dword [ebp - 0x24]
call esi
test eax, eax
je 0x470fbf
push 1
push 0
push 0
push dword [ebp - 0x24]
call edi
mov dword [ebx + 0x3d8], eax
cmp eax, 0xffffffff
je 0x470fbf
mov ecx, dword [ebx + 0xac]
sub ecx, eax
mov eax, 1
mov dword [ebx + 0x3d8], ecx
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004d2a60
mov esp, ebp
pop ebp
ret 4