Function at 0x404bbc
Capabilities:
Terminate process

Disassembly:
mov dx, word [ebp - 0x46]
push ebp
mov ebp, esp
push eax
push ebx
push ebx
push ebx
push ebx
push 0
push 0
push 0
push 0
push 0
fistp qword [ebp - 0x14]
push esi
push edi
mov eax, edx
call fcn.00405bb7
jb 0x40516d
mov al, byte [esi + 0xc]
movzx edi, word [esi + 0x2e]
mov dword [esi + 0x24], 0
mov dword [esi + 0x28], 0
test al, 4
jne 0x404f30
test al, 0x20
je 0x405171
test bl, 1
je 0x404c4a
cmp word [esi + 0xa], 1
jne 0x405171
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 0x10]
sub eax, edi
sbb edx, 0
jb 0x405175
mov dword [esi + 0x14], eax
lea ecx, [esi + 0x18]
mov dword [ecx], edx
push 0
push ecx
push eax
push dword [esi + 6]
mov edx, dword [sym.imp.KERNEL32.DLL_SetFilePointer]
call fcn.00406afb
jb 0x405169
test word [ebp - 8], 0x40
je 0x404c7f
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x1c], ebx
mov eax, dword [ebx]
mov dword [ebp + 8], eax
mov eax, dword [ebx + 8]
mov ecx, dword [ebp - 4]
cmp eax, ecx
jb 0x404c69
mov eax, ecx
mov ecx, eax
mul dword [ebx + 0x14]
mov dword [ebp - 4], eax
test word [ebp - 8], 0xc
jne 0x404d33
jmp 0x404caf
test word [ebp - 8], 8
jne 0x404ca1
test word [ebp - 8], 4
je 0x404caf
mov edi, dword [ebp + 8]
mov edi, dword [edi]
call fcn.00405b52
mov dword [ebp + 8], edi
mov dword [ebp - 4], edx
jmp 0x404caf
mov ebx, dword [ebp + 8]
call fcn.00406188
mov dword [ebp + 8], ebx
mov dword [ebp - 4], edx
push 0
lea edx, [esi + 0x3c]
push edx
push dword [ebp - 4]
push dword [ebp + 8]
push dword [esi + 6]
mov edx, dword [sym.imp.KERNEL32.DLL_ReadFile]
test word [ebp - 8], 0x20
je 0x404cd2
mov edx, dword [sym.imp.KERNEL32.DLL_WriteFile]
call fcn.00406afb
jb 0x405169
and word [esi + 0x2c], 0xfffd
mov eax, dword [esi + 0x3c]
test word [ebp - 8], 2
jne 0x404cf4
add dword [esi + 0x14], eax
adc dword [esi + 0x18], 0
mov ecx, dword [ebp - 4]
cmp eax, ecx
je 0x404d18
test word [ebp - 8], 0x20
jne 0x405179
or word [esi + 0x2c], 2
mov edi, dword [ebp + 8]
add edi, eax
sub ecx, eax
xor al, al
cld
rep stosb byte es:[edi], al
test word [ebp - 8], 0x40
je 0x404d2b
mov eax, dword [esi + 0x3c]
mov ebx, dword [ebp - 0x1c]
xor edx, edx
idiv dword [ebx + 0x14]
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4
mov dword [ebp - 4], ecx
and word [esi + 0x2c], 0xfffd
test word [ebp - 8], 0x20
jne 0x404e6a
lea ebx, [esi + 0x3c]
lea edi, [ebp - 0x24]
push 0
push ebx
push 2
push edi
push dword [esi + 6]
mov edx, dword [sym.imp.KERNEL32.DLL_ReadFile]
call fcn.00406afb
jb 0x405169
mov eax, dword [esi + 0x3c]
add dword [esi + 0x14], eax
adc dword [esi + 0x18], 0
cmp eax, 2
jne 0x404e3f
movzx ecx, word [ebp - 0x24]
mov dword [ebp - 0x24], ecx
cmp ecx, 0xffff
jne 0x404db6
push 0
push ebx
push 4
push edi
push dword [esi + 6]
mov edx, dword [sym.imp.KERNEL32.DLL_ReadFile]
call fcn.00406afb
jb 0x405169
mov eax, dword [esi + 0x3c]
add dword [esi + 0x14], eax
adc dword [esi + 0x18], 0
cmp eax, 4
jne 0x404e3f
test word [ebp - 8], 4
jne 0x404dee
mov ebx, dword [ebp + 8]
test dword [ebx + 0xc], 0xffffffff
je 0x404dee
call fcn.00406188
mov edi, ebx
lea ebx, [esi + 0x3c]
push 0
push ebx
push edx
push edi
push dword [esi + 6]
mov edx, dword [sym.imp.KERNEL32.DLL_ReadFile]
call fcn.00406afb
jae 0x404e30
jmp 0x405169
lea ebx, [esi + 0x3c]
mov ecx, dword [ebp - 0x24]
call fcn.00405ae3
jb 0x40517f
mov dword [ebp - 0x28], edx
push 0
push ebx
push ecx
push edi
push dword [esi + 6]
mov edx, dword [sym.imp.KERNEL32.DLL_ReadFile]
call fcn.00406afb
jb 0x405169
mov dword [ebp - 0x28], 0
push esi
mov esi, edi
mov ebx, dword [ebp + 8]
xchg dword [ebx], esi
call fcn.00405b17
pop esi
mov eax, dword [esi + 0x3c]
add dword [esi + 0x14], eax
adc dword [esi + 0x18], 0
cmp eax, dword [edi - 4]
je 0x404e46
or word [esi + 0x2c], 2
jmp 0x404e62
add dword [ebp + 8], 4
test word [ebp - 8], 4
jne 0x404e56
add dword [ebp + 8], 0xc
inc dword [ebp - 0x18]
dec dword [ebp - 4]
jne 0x404d47
mov eax, dword [ebp - 0x18]
jmp 0x404d2b
test word [ebp - 8], 4
jne 0x404e87
mov ebx, dword [ebp + 8]
test dword [ebx + 0xc], 0xffffffff
je 0x404e87
call fcn.00406188
mov edi, ebx
jmp 0x404e91
mov edi, dword [ebp + 8]
mov edi, dword [edi]
call fcn.00405b52
cmp edx, 0xffff
jae 0x404ea3
mov ecx, 2
mov dword [ebp - 0x24], edx
jmp 0x404eb1
mov ecx, 6
mov word [ebp - 0x24], 0xffff
mov dword [ebp - 0x22], edx
lea eax, [ebp - 0x24]
lea ebx, [esi + 0x3c]
push ecx
push 0
push ebx
push ecx
push eax
push dword [esi + 6]
mov edx, dword [sym.imp.KERNEL32.DLL_WriteFile]
call fcn.00406afb
pop ecx
jb 0x405169
mov eax, dword [esi + 0x3c]
add dword [esi + 0x14], eax
adc dword [esi + 0x18], 0
cmp eax, ecx
jne 0x405179
push 0
push ebx
push dword [edi - 4]
push edi
push dword [esi + 6]
mov edx, dword [sym.imp.KERNEL32.DLL_WriteFile]
call fcn.00406afb
jb 0x405169
mov eax, dword [esi + 0x3c]
add dword [esi + 0x14], eax
adc dword [esi + 0x18], 0
cmp eax, dword [edi - 4]
jne 0x405179
add dword [ebp + 8], 4
test word [ebp - 8], 4
jne 0x404f22
add dword [ebp + 8], 0xc
dec dword [ebp - 4]
jne 0x404e6a
jmp 0x404d2b
test word [ebp - 8], 0x40
jne 0x405171
or word [ebp - 8], 0x10
test bl, 1
jne 0x404f50
add dword [esi + 0x14], 1
adc dword [esi + 0x18], 0
jmp 0x404f67
cmp word [esi + 0xa], 1
jne 0x405171
mov eax, dword [ebp - 0x14]
mov dword [esi + 0x14], eax
mov eax, dword [ebp - 0x10]
mov dword [esi + 0x18], eax
call fcn.00405196
jb 0x405175
lea ecx, [esi + 0x40]
push 0
push ecx
push eax
push dword [esi + 6]
mov edx, dword [sym.imp.KERNEL32.DLL_SetFilePointer]
call fcn.00406afb
jb 0x405169
test dword [ebp - 4], 0xffffffff
jne 0x404fa2
mov eax, dword [esi + 0x1c]
mov dword [ebp - 4], eax
lea eax, [esi + 0x44]
mov dword [ebp + 8], eax
mov bx, word [ebp - 8]
test bl, 0x20
jne 0x4050cc
test bl, 0xc
je 0x405083
test bl, 2
je 0x405008
test bl, 4
jne 0x404fce
mov ebx, dword [ebp + 8]
call fcn.00406188
mov edi, ebx
jmp 0x404fd8
mov edi, dword [ebp + 8]
mov edi, dword [edi]
call fcn.00405b52
mov dword [ebp + 8], edi
mov dword [ebp - 4], edx
mov eax, dword [esi + 0x1c]
cmp eax, edx
jae 0x404caf
mov dword [ebp - 4], eax
test word [ebp - 8], 0x20
jne 0x404caf
mov ecx, edx
sub ecx, eax
add edi, eax
xor al, al
cld
rep stosb byte es:[edi], al
jmp 0x404caf
push 0
lea edx, [esi + 0x3c]
push edx
push 2
lea edx, [ebp - 0xc]
push edx
push dword [esi + 6]
mov edx, dword [sym.imp.KERNEL32.DLL_ReadFile]
call fcn.00406afb
jb 0x405169
cmp dword [esi + 0x3c], 2
je 0x405038
or word [esi + 0x2c], 2
jmp 0x40515c
test word [ebp - 8], 4
jne 0x405050
mov ebx, dword [ebp + 8]
call fcn.00406188
mov edi, ebx
movzx ecx, word [ebp - 0xc]
jmp 0x40507d
movzx ecx, word [ebp - 0xc]
mov edi, dword [ebp + 8]
mov edi, dword [edi]
mov ebx, edi
call fcn.00405b52
cmp ecx, edx
je 0x40507d
xchg esi, ebx
call fcn.00405b17
xchg esi, ebx
call fcn.00405ae3
jb 0x405169
mov ebx, dword [ebp + 8]
mov dword [ebx], edx
mov dword [ebp - 4], ecx
mov dword [ebp + 8], edi
push 0
lea edx, [esi + 0x3c]
push edx
push dword [ebp - 4]
push dword [ebp + 8]
push dword [esi + 6]
mov edx, dword [sym.imp.KERNEL32.DLL_ReadFile]
call fcn.00406afb
jb 0x405169
and word [esi + 0x2c], 0xfffd
mov eax, dword [esi + 0x3c]
mov ecx, dword [ebp - 4]
cmp eax, ecx
je 0x40515c
or word [esi + 0x2c], 2
mov edi, dword [ebp + 8]
add edi, eax
sub ecx, eax
xor al, al
cld
rep stosb byte es:[edi], al
jmp 0x40515c
test bl, 0xc
je 0x405128
test bl, 2
jne 0x404fce
mov edi, dword [ebp + 8]
mov edi, dword es:[edi]
call fcn.00405b52
add edx, 2
sub edi, 2
push dword [edi]
mov ecx, dword [esi + 0x1c]
cmp ecx, edx
jb 0x4050f6
mov ecx, edx
cmp ecx, 0x10000
jb 0x405103
mov ecx, 0xffff
sub ecx, 2
mov word [edi], cx
add ecx, 2
push ecx
push 0
lea edx, [esi + 0x3c]
push edx
push ecx
push edi
push dword [esi + 6]
mov edx, dword [sym.imp.KERNEL32.DLL_WriteFile]
call fcn.00406afb
pop ecx
pop dword [edi]
jmp 0x40514e
mov ecx, dword [esi + 0x1c]
mov edx, dword [ebp - 4]
cmp ecx, edx
jb 0x405134
mov ecx, edx
push ecx
push 0
lea edx, [esi + 0x3c]
push edx
push ecx
push dword [ebp + 8]
push dword [esi + 6]
mov edx, dword [sym.imp.KERNEL32.DLL_WriteFile]
call fcn.00406afb
pop ecx
jb 0x405169
and word [esi + 0x2c], 0xfffd
mov eax, dword [esi + 0x3c]
cmp eax, ecx
jne 0x405179
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4
mov al, dl
mov dx, 0x34b0
mov al, 0x34
mov dx, 0x36b0
mov al, 0x36
mov dx, 0x3fb0
mov al, 0x3f
mov dx, 0x3db0
mov al, 0x3d
mov dx, 0x9b0
mov esi, dword [ebp - 0x28]
call fcn.00405b17
pop edi
pop esi
mov esp, ebp
pop ebp
pop edx
add esp, 4
push edx
jmp fcn.004044fc