Function at 0x1004221c
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push 0xa0
mov eax, 0x100a46c0
call fcn.10002f91
mov eax, dword [ebp + 8]
and dword [ebp - 0x2c], 0
push eax
mov dword [ebp - 0x30], eax
call fcn.10032aeb
mov edi, dword [ebp + 0x18]
mov esi, eax
mov ebx, dword [ebp + 0x1c]
mov ecx, edi
and ecx, ebx
mov dword [ebp - 0x3c], edi
mov dword [ebp - 0x34], ebx
cmp ecx, 0xffffffff
jne 0x10042262
mov edi, esi
mov ebx, edx
sub edi, dword [ebp + 0x10]
mov dword [ebp - 0x3c], edi
sbb ebx, dword [ebp + 0x14]
mov dword [ebp - 0x34], ebx
mov ecx, edi
mov eax, ebx
add ecx, dword [ebp + 0x10]
adc eax, dword [ebp + 0x14]
cmp eax, edx
jb 0x10042285
ja 0x10042276
cmp ecx, esi
jbe 0x10042285
push 0x80070057
push 0x2e6e7432
call fcn.1003d2e5
mov eax, edi
or eax, ebx
je 0x100426f4
cmp dword [ebp + 0xc], 1
jne 0x100422a5
lea eax, [ebp - 0x40]
push eax
push ebx
push edi
call fcn.10029b73
mov esi, dword [ebp - 0x40]
jmp 0x100422f0
test ebx, ebx
jne 0x100422de
cmp edi, 0xc0000
ja 0x100422de
test ebx, ebx
jne 0x100422d7
cmp edi, 0x30000
ja 0x100422d7
test ebx, ebx
jne 0x100422d0
cmp edi, 0x6000
ja 0x100422d0
mov eax, 0x180
jmp 0x100422e3
mov eax, 0xc00
jmp 0x100422e3
mov eax, 0x6000
jmp 0x100422e3
mov eax, 0x30000
lea ecx, [ebp - 0x54]
push ecx
push eax
call fcn.1001d19f
mov esi, dword [ebp - 0x54]
and dword [ebp - 0x14], 0
lea ecx, [ebp - 0x14]
push 0
push esi
push 0x11
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x28], esi
call fcn.1003b181
mov eax, dword [ebp + 0xc]
and dword [ebp - 4], 0
sub eax, 0
je 0x100426e5
sub eax, 1
je 0x1004242c
sub eax, 1
je 0x10042342
sub eax, 1
je 0x10042462
push 0x80070057
push 0x2e6e7433
call fcn.1003d2e5
jmp 0x10042462
lea eax, [ebp - 0x64]
push eax
lea ecx, [ebp - 0x14]
call fcn.1002bf8e
mov ecx, dword [eax + 4]
mov al, byte [ebp + 0x28]
mov byte [ecx], al
lea ecx, [ebp - 0x64]
call fcn.10041cd6
lea eax, [ebp - 0x6c]
push eax
lea ecx, [ebp - 0x14]
call fcn.1002bf8e
mov ecx, dword [eax + 4]
mov al, byte [ebp + 0x2c]
mov byte [ecx + 1], al
lea ecx, [ebp - 0x6c]
call fcn.10041cd6
lea eax, [ebp - 0x74]
push eax
lea ecx, [ebp - 0x14]
call fcn.1002bf8e
mov ecx, dword [eax + 4]
mov al, byte [ebp + 0x30]
mov byte [ecx + 2], al
lea ecx, [ebp - 0x74]
call fcn.10041cd6
push 3
pop eax
mov dword [ebp - 0x58], eax
cmp dword [ebp - 0x24], eax
jbe 0x1004241a
mov ebx, eax
lea eax, [ebp - 0x84]
push eax
lea ecx, [ebp - 0x14]
call fcn.1002bf8e
mov esi, eax
lea eax, [ebp - 0x7c]
mov byte [ebp - 4], 2
push eax
lea ecx, [ebp - 0x14]
call fcn.1002bf8e
mov esi, dword [esi + 4]
mov edi, eax
and dword [ebp - 0x28], 0
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x44]
mov dword [ebp - 0x44], ebx
push eax
lea eax, [ebp - 0x24]
push eax
call fcn.1001d37d
mov eax, dword [edi + 4]
push ebx
push esi
push dword [ebp - 0x28]
add eax, ebx
push eax
call fcn.100269c5
add esp, 0x10
lea ecx, [ebp - 0x7c]
call fcn.10041cd6
lea ecx, [ebp - 0x84]
mov byte [ebp - 4], 0
call fcn.10041cd6
add ebx, ebx
cmp dword [ebp - 0x24], ebx
ja 0x100423a5
mov edi, dword [ebp - 0x3c]
mov ebx, dword [ebp - 0x34]
mov byte [ebp + 0x30], 0
mov al, byte [ebp + 0x30]
mov byte [ebp + 0x2c], al
mov al, byte [ebp + 0x2c]
mov byte [ebp + 0x28], al
jmp 0x1004245c
lea eax, [ebp - 0x8c]
push eax
lea ecx, [ebp - 0x14]
call fcn.1002bf8e
push esi
mov ecx, dword [eax + 4]
movzx eax, byte [ebp + 0x28]
push eax
push ecx
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea ecx, [ebp - 0x8c]
call fcn.10041cd6
mov byte [ebp + 0x28], 0
mov esi, dword [ebp - 0x24]
mov dword [ebp - 0x28], esi
and dword [ebp - 0x38], 0
cmp byte [ebp + 0x20], 0
mov byte [ebp - 4], 3
je 0x1004247d
push 0
push esi
push 0x11
lea ecx, [ebp - 0x38]
call fcn.1003b181
push 0
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp - 0x30]
call fcn.1003ae45
mov dword [ebp - 0x50], edi
mov dword [ebp - 0x4c], ebx
push esi
push ebx
push edi
call fcn.100299c5
test al, al
je 0x100424a4
mov dword [ebp - 0x24], esi
jmp 0x100424b5
lea eax, [ebp - 0x5c]
push eax
push ebx
push edi
call fcn.10029b73
mov eax, dword [ebp - 0x5c]
mov dword [ebp - 0x24], eax
cmp dword [ebp + 0xc], 3
jne 0x100424c6
push 0
lea eax, [ebp - 0x14]
push eax
call fcn.100317bc
cmp byte [ebp + 0x20], 0
xorps xmm0, xmm0
movlpd qword [ebp - 0x48], xmm0
je 0x100424e7
push 1
push 0
push 0
push dword [ebp - 0x30]
call fcn.1003ae45
mov dword [ebp - 0x3c], edx
jmp 0x100424f0
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x48]
mov dword [ebp - 0x40], eax
lea ecx, [ebp - 0x14]
lea eax, [ebp - 0x94]
push eax
call fcn.1002bf8e
or dword [ebp - 0x2c], 1
lea ecx, [ebp - 0x18]
push 0
push ecx
push dword [ebp - 0x24]
push dword [eax + 4]
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1004252b
mov eax, dword [ebp - 0x24]
mov byte [ebp - 0x1d], 0
cmp eax, dword [ebp - 0x18]
je 0x1004252f
mov byte [ebp - 0x1d], 1
mov eax, dword [ebp - 0x2c]
test al, 1
je 0x10042547
and eax, 0xfffffffe
lea ecx, [ebp - 0x94]
mov dword [ebp - 0x2c], eax
call fcn.10041cd6
cmp byte [ebp - 0x1d], 0
je 0x1004256c
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
push ecx
push 0x2e6e7434
call fcn.1003d2e5
cmp byte [ebp + 0x20], 0
je 0x1004266d
push 0
push dword [ebp - 0x3c]
push dword [ebp - 0x40]
push dword [ebp - 0x30]
call fcn.1003ae45
lea eax, [ebp - 0x9c]
push eax
lea ecx, [ebp - 0x38]
call fcn.1002bf8e
mov esi, dword [ebp - 0x24]
lea ecx, [ebp - 0x1c]
mov ebx, dword [ebp - 0x2c]
push 0
push ecx
push esi
push dword [eax + 4]
or ebx, 2
push dword [ebp - 0x30]
mov dword [ebp - 0x2c], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x100425c1
mov byte [ebp - 0x1d], 0
cmp esi, dword [ebp - 0x1c]
je 0x100425c5
mov byte [ebp - 0x1d], 1
test bl, 2
je 0x100425db
and ebx, 0xfffffffd
lea ecx, [ebp - 0x9c]
mov dword [ebp - 0x2c], ebx
call fcn.10041cd6
cmp byte [ebp - 0x1d], 0
je 0x10042600
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
push ecx
push 0x2e6e7435
call fcn.1003d2e5
lea eax, [ebp - 0xac]
push eax
lea ecx, [ebp - 0x38]
call fcn.1002bf8e
mov esi, eax
lea eax, [ebp - 0xa4]
mov byte [ebp - 4], 4
push eax
lea ecx, [ebp - 0x14]
call fcn.1002bf8e
push dword [ebp - 0x24]
push dword [esi + 4]
push dword [eax + 4]
call sub.VCRUNTIME140.dll_memcmp
add esp, 0xc
lea ecx, [ebp - 0xa4]
test eax, eax
sete bl
call fcn.10041cd6
lea ecx, [ebp - 0xac]
mov byte [ebp - 4], 3
call fcn.10041cd6
test bl, bl
jne 0x10042667
push 0x80004005
push 0x2e6e7436
call fcn.1003d2e5
mov esi, dword [ebp - 0x28]
mov ebx, dword [ebp - 0x34]
push esi
push ebx
push edi
call fcn.100299a3
test al, al
jne 0x10042691
push esi
lea eax, [ebp - 0x50]
push eax
call fcn.10029a0f
mov ebx, dword [ebp - 0x4c]
mov edi, dword [ebp - 0x50]
mov dword [ebp - 0x34], ebx
jmp 0x10042493
cmp byte [ebp + 0x20], 0
je 0x1004269f
lea ecx, [ebp - 0x38]
call fcn.1003adeb
lea ecx, [ebp - 0x14]
call fcn.1003adeb
cmp byte [ebp + 0x24], 0
je 0x100426d9
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
test eax, eax
jne 0x100426d9
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
push ecx
push 0x2e6e7437
call fcn.1003d2e5
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], 5
call fcn.10039e3a
lea ecx, [ebp - 0x14]
mov dword [ebp - 4], 6
call fcn.10039e3a
call fcn.100034a6
ret 0x2c