Function at 0x401c40
Capabilities:
Clear file content

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [ebp + 0x14]
push ebx
push esi
push edi
mov edi, ecx
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 0xc]
xor esi, esi
mov dword [ebp - 0xc], ecx
cmp ecx, eax
jb 0x401e76
mov ebx, dword [ebp + 0x10]
mov eax, dword [ebp + 8]
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 8], eax
ja 0x401c77
cmp eax, ebx
jbe 0x401e76
push 0x10000
call fcn.0040164d
add esp, 4
mov dword [ebp - 0x10], eax
test eax, eax
je 0x401e6b
push dword [edi + 0xc]
lea eax, [ebp - 0x24]
push eax
push dword [edi + 4]
call fcn.004165e0
add esp, 0xc
test eax, eax
je 0x401e60
mov edx, dword [ebp - 0x20]
cmp dword [ebp + 0xc], edx
ja 0x401e60
mov ecx, dword [ebp - 0x24]
jb 0x401cc3
cmp dword [ebp + 8], ecx
jae 0x401e60
sub ecx, dword [ebp + 8]
mov esi, dword [ebp + 0xc]
mov eax, ecx
sbb edx, esi
mov dword [ebp - 0x14], ecx
or eax, edx
mov dword [ebp - 0x18], edx
jne 0x401d43
mov esi, dword [ebp + 0x14]
push dword [edi + 0xc]
add ebx, 0x1ff
push 0
adc esi, 0
and ebx, 0xfffffe00
push esi
push ebx
push dword [edi + 4]
mov dword [ebp - 4], esi
call fcn.00416580
mov esi, eax
add esp, 0x14
test esi, esi
je 0x401e60
mov ecx, dword [edi + 0xc]
test ecx, ecx
jne 0x401e50
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x401e60
push dword [ebp - 0x10]
lea esi, [eax + 0x43]
call fcn.00442e59
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov esi, dword [ebp - 0xc]
mov ebx, 0x10000
test edx, edx
ja 0x401d54
jb 0x401d52
cmp ecx, ebx
jae 0x401d54
mov ebx, ecx
push dword [edi + 0xc]
push 0
push esi
push dword [ebp - 8]
push dword [edi + 4]
call fcn.00416580
mov esi, eax
add esp, 0x14
test esi, esi
jne 0x401e60
push eax
push dword [edi + 0xc]
lea eax, [ebp + 0xc]
push eax
push ebx
push dword [ebp - 0x10]
push dword [edi + 4]
call fcn.00416510
mov esi, eax
add esp, 0x18
test esi, esi
jne 0x401e60
cmp dword [ebp + 0xc], ebx
jne 0x401e35
push dword [edi + 0xc]
mov ebx, dword [ebp - 0x1c]
push eax
push dword [ebp - 4]
push ebx
push dword [edi + 4]
call fcn.00416580
mov esi, eax
add esp, 0x14
test esi, esi
jne 0x401e60
push eax
push dword [edi + 0xc]
lea eax, [ebp + 0x14]
push eax
push dword [ebp + 0xc]
push dword [ebp - 0x10]
push dword [edi + 4]
call fcn.00416770
mov esi, eax
add esp, 0x18
test esi, esi
jne 0x401e60
mov eax, dword [ebp + 0xc]
cmp dword [ebp + 0x14], eax
jne 0x401e1a
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x18]
sub ecx, eax
mov dword [ebp - 0x14], ecx
sbb edx, esi
add dword [ebp - 8], eax
mov dword [ebp - 0x18], edx
adc dword [ebp - 0xc], esi
add ebx, eax
mov esi, dword [ebp - 4]
mov eax, ecx
adc esi, 0
mov dword [ebp - 0x1c], ebx
or eax, edx
mov dword [ebp - 4], esi
jne 0x401d40
jmp 0x401cda
push dword [ebp - 0x10]
mov esi, 4
call fcn.00442e59
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
push dword [ebp - 0x10]
mov esi, 3
call fcn.00442e59
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov eax, dword [ecx]
push 0
push dword [ebp - 4]
push ebx
push dword [edi + 4]
call dword [eax + 0x64]
mov esi, eax
push dword [ebp - 0x10]
call fcn.00442e59
add esp, 4
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
pop edi
pop esi
mov eax, 0x3d
pop ebx
mov esp, ebp
pop ebp
ret 0x10