Function at 0x475830
Capabilities:
Clear file content

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffc4
push ebx
push esi
push edi
mov dword [ebp - 4], ecx
mov edi, edx
mov ebx, eax
test edi, edi
je 0x47584d
cmp edi, 0xffffffff
jne 0x4758fc
mov eax, dword [ebx + 0x90]
test eax, eax
je 0x475894
cmp byte [eax + 0x1eb], 0
je 0x475894
cmp dword [eax + 0x1c8], 0
je 0x475894
lea ecx, [ebp - 0x24]
mov eax, dword [eax + 0x1c8]
mov edx, ebx
mov esi, dword [eax]
call dword [esi + 0x14]
push 2
lea eax, [ebp - 0x24]
push eax
push 0
mov eax, dword [ebx + 0x90]
call fcn.0047d8a4
push eax
call sub.KERNEL32.DLL_SetEndOfFile
jmp 0x4758c0
mov eax, dword [ebx + 0x40]
mov dword [ebp - 0x24], eax
mov eax, dword [ebx + 0x44]
mov dword [ebp - 0x20], eax
mov esi, dword [ebx + 0x34]
test esi, esi
je 0x4758c0
lea ecx, [ebp - 0x2c]
lea edx, [ebp - 0x24]
mov eax, esi
call fcn.004742fc
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x20], eax
mov eax, ebx
call fcn.0047488c
push eax
lea eax, [ebp - 0x3c]
push eax
mov eax, ebx
call fcn.004748a0
mov ecx, eax
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x24]
call fcn.0040a998
lea esi, [ebp - 0x3c]
lea edi, [ebp - 0x24]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
lea edx, [ebp - 0x24]
mov eax, ebx
call fcn.00475a44
mov byte [ebp - 5], al
jmp 0x475a35
mov eax, ebx
call fcn.00475e9c
cmp dword [ebx + 0x90], 0
je 0x475927
mov eax, dword [ebx + 0x90]
mov ecx, ebx
mov edx, edi
mov si, 0xffbd
call fcn.00405190
test al, al
jne 0x475927
xor eax, eax
jmp 0x475929
mov al, 1
mov byte [ebp - 5], al
cmp byte [ebp - 5], 0
je 0x475a35
mov ecx, ebx
mov dl, 1
mov eax, dword [0x466df8]
call fcn.00471a6c
mov dword [ebp - 0xc], eax
xor edx, edx
push ebp
push 0x475a2e
push dword fs:[edx]
mov dword fs:[edx], esp
mov eax, dword [ebx + 0x90]
test eax, eax
je 0x475968
call fcn.0047d8a4
mov esi, eax
jmp 0x47596a
xor esi, esi
lea edx, [ebp - 0x24]
mov eax, ebx
call fcn.00474190
test esi, esi
je 0x475986
push 2
lea eax, [ebp - 0x24]
push eax
push 0
push esi
call sub.KERNEL32.DLL_SetEndOfFile
mov eax, dword [ebp - 0xc]
mov dword [eax + 0x14], edi
mov eax, dword [ebp - 0xc]
movzx edx, byte [ebp + 8]
mov byte [eax + 0x5c], dl
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 4]
mov dword [eax + 0x60], edx
mov eax, dword [ebp - 0xc]
push edi
lea edi, [eax + 0x4c]
lea esi, [ebp - 0x24]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
pop edi
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x10], eax
push 1
lea eax, [ebp - 0x14]
push eax
mov eax, edi
call fcn.0047d8a4
push eax
push 0
call sub.KERNEL32.DLL_SetEndOfFile
mov eax, dword [ebp - 0x14]
cmp eax, 0x7fff
jg 0x4759e0
cmp eax, 0xffff8000
jge 0x4759e9
shr eax, 0x10
movsx eax, ax
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x10]
cmp eax, 0x7fff
jg 0x4759fa
cmp eax, 0xffff8000
jge 0x475a03
shr eax, 0x10
movsx eax, ax
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
push eax
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0xc]
mov eax, edi
mov si, 0xffb5
call fcn.00405190
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x475a35
mov eax, dword [ebp - 0xc]
call fcn.00404f08
ret
movzx eax, byte [ebp - 5]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4