Function at 0x421020
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x476fa4
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x26c
push ebx
push ebp
push esi
push edi
mov edi, ecx
mov dword [esp + 0x20], 0
mov dword [esp + 0x28], edi
cmp dword [edi + 0x10], 1
jne 0x42106d
mov dword [esp + 0x10], 0x1f0
mov dword [esp + 0x14], 8
mov dword [esp + 0x24], 4
jmp 0x421085
mov dword [esp + 0x10], 0x1e8
mov dword [esp + 0x14], 0x10
mov dword [esp + 0x24], 8
mov esi, dword [esp + 0x290]
mov eax, dword [esp + 0x294]
mov ecx, dword [esp + 0x28c]
push 0
push 0
push esi
push ecx
mov ebx, esi
mov dword [eax], 0
call dword [sym.imp.kernel32.dll_SetFilePointer]
cmp eax, esi
jne 0x42119a
mov ebp, dword [esp + 0x30]
mov ecx, dword [esp + 0x28c]
lea edx, [esp + 0x30]
push 0
push edx
lea eax, [esp + 0x74]
push 0x200
push eax
push ecx
call dword [sym.imp.kernel32.dll_ReadFile]
test eax, eax
je 0x4213b3
cmp dword [esp + 0x30], 0x200
jne 0x4215d0
mov eax, dword [esp + 0x10]
xor edx, edx
xor ecx, ecx
xor edi, edi
mov dl, byte [esp + eax + 0x6e]
xor eax, eax
mov dword [esp + 0x18], edx
mov edx, dword [esp + 0x25c]
xor esi, esi
and edx, 0xff
jle 0x421141
mov ebp, dword [esp + eax + 0x6c]
cmp ebp, 0x21
jae 0x421132
test ebp, ebp
je 0x421132
cmp ebp, edi
je 0x421129
mov edi, ebp
mov ecx, eax
add eax, dword [esp + 0x18]
inc esi
cmp esi, edx
jl 0x421114
cmp eax, 0x200
je 0x4217ef
test eax, eax
jne 0x421149
test ebp, ebp
je 0x42199d
mov edx, dword [esp + 0x10]
mov dl, byte [esp + edx + 0x6f]
test dl, dl
je 0x421b4b
test ecx, ecx
jne 0x421163
mov ecx, dword [esp + 0x14]
jmp 0x42116f
mov edi, dword [esp + 0x18]
mov esi, dword [esp + 0x14]
sub ecx, edi
add ecx, esi
mov ebx, dword [esp + ecx + 0x6c]
test dl, dl
je 0x421b4b
mov edx, dword [esp + 0x28c]
push 0
push 0
push ebx
push edx
call dword [sym.imp.kernel32.dll_SetFilePointer]
cmp eax, ebx
je 0x4210ba
mov edi, dword [esp + 0x28]
call dword [sym.imp.kernel32.dll_GetLastError]
mov esi, eax
mov eax, dword [0x49aec0]
mov dword [esp + 0x10], eax
lea ecx, [esp + 0x1c]
push 0x5335
push ecx
mov dword [esp + 0x28c], 0
call fcn.0042ba30
mov edx, dword [edi + 0x18]
mov eax, dword [eax]
push 0
push edx
push eax
lea eax, [esp + 0x24]
push eax
mov byte [esp + 0x29c], 1
call fcn.004638af
add esp, 0x18
lea ecx, [esp + 0x1c]
mov byte [esp + 0x284], 0
call fcn.00465892
mov ecx, dword [esp + 0x10]
mov edi, 5
push esi
mov eax, dword [ecx - 8]
test eax, eax
jne 0x421237
lea edx, [esp + 0x28]
push edx
call fcn.0042b940
mov ebx, 1
mov dword [esp + 0x28], ebx
mov eax, dword [eax]
lea ecx, [esp + 0x18]
push eax
push 0x498ca4
push ecx
mov byte [esp + 0x298], 4
call fcn.004638af
add esp, 0x14
jmp 0x42127d
lea edx, [esp + 0x30]
push edx
call fcn.0042b940
add esp, 8
mov dword [esp + 0x20], 2
push eax
lea eax, [esp + 0x20]
push 0x498ca0
push eax
mov dword [esp + 0x290], edi
call fcn.00465b9b
mov ebx, 6
mov dword [esp + 0x20], ebx
push eax
lea ecx, [esp + 0x14]
mov dword [esp + 0x288], ebx
call fcn.00465caa
test bl, 4
mov dword [esp + 0x284], edi
je 0x421299
and ebx, 0xfffffffb
lea ecx, [esp + 0x1c]
mov dword [esp + 0x20], ebx
call fcn.00465892
test bl, 2
mov dword [esp + 0x284], 4
je 0x4212b9
and ebx, 0xfffffffd
lea ecx, [esp + 0x2c]
mov dword [esp + 0x20], ebx
call fcn.00465892
test bl, 1
mov dword [esp + 0x284], 0
je 0x4212d2
lea ecx, [esp + 0x24]
call fcn.00465892
mov ecx, dword [0x49a15c]
push 0
push 0x498b18
push 0x498b18
push 0
push ecx
call fcn.004420f7
add esp, 0x14
test eax, eax
jne 0x421309
mov edx, dword [0x49a15c]
mov dword [0x49a15c], 0x49e1e0
mov dword [0x49e210], edx
push 0x498b0c
lea ecx, [esp + 0x18]
call fcn.00465900
mov bl, 7
push 0x499a3c
lea ecx, [esp + 0x1c]
mov byte [esp + 0x288], bl
call fcn.00465900
push 0
push esi
lea eax, [esp + 0x1c]
push 0x269
lea ecx, [esp + 0x24]
push eax
push ecx
mov ecx, dword [0x49a15c]
mov byte [esp + 0x298], 8
call fcn.00429ee0
lea ecx, [esp + 0x18]
mov byte [esp + 0x284], bl
call fcn.00465892
lea ecx, [esp + 0x14]
mov byte [esp + 0x284], 0
call fcn.00465892
mov ecx, dword [0x49a15c]
lea edx, [esp + 0x10]
push edx
call fcn.00429f60
mov ecx, dword [0x49a15c]
call fcn.0042a9e0
mov ecx, dword [0x49a15c]
call fcn.0042a040
lea ecx, [esp + 0x10]
mov dword [esp + 0x284], 0xffffffff
call fcn.00465892
jmp 0x421d18
call dword [sym.imp.kernel32.dll_GetLastError]
mov esi, eax
mov eax, dword [0x49aec0]
mov dword [esp + 0x10], eax
lea ecx, [esp + 0x1c]
mov ebp, 9
push 0x5335
push ecx
mov dword [esp + 0x28c], ebp
call fcn.0042ba30
mov edx, dword [esp + 0x30]
mov eax, dword [eax]
push 0
mov byte [esp + 0x290], 0xa
mov ecx, dword [edx + 0x18]
lea edx, [esp + 0x1c]
push ecx
push eax
push edx
call fcn.004638af
add esp, 0x18
lea ecx, [esp + 0x1c]
mov byte [esp + 0x284], 9
call fcn.00465892
mov eax, dword [esp + 0x10]
mov edi, 0xe
push esi
mov ecx, dword [eax - 8]
test ecx, ecx
jne 0x421455
lea ecx, [esp + 0x28]
push ecx
call fcn.0042b940
mov ebx, 8
mov dword [esp + 0x28], ebx
mov edx, dword [eax]
lea eax, [esp + 0x18]
push edx
push 0x498ca4
push eax
mov byte [esp + 0x298], 0xd
call fcn.004638af
add esp, 0x14
jmp 0x42149f
lea ecx, [esp + 0x30]
push ecx
call fcn.0042b940
add esp, 8
mov dword [esp + 0x20], 0x10
push eax
lea edx, [esp + 0x20]
push 0x498ca0
push edx
mov dword [esp + 0x290], edi
call fcn.00465b9b
mov ebx, 0x30
mov dword [esp + 0x20], ebx
push eax
lea ecx, [esp + 0x14]
mov dword [esp + 0x288], 0xf
call fcn.00465caa
test bl, 0x20
mov dword [esp + 0x284], edi
je 0x4214bb
and ebx, 0xffffffdf
lea ecx, [esp + 0x1c]
mov dword [esp + 0x20], ebx
call fcn.00465892
test bl, 0x10
mov dword [esp + 0x284], 0xd
je 0x4214db
and ebx, 0xffffffef
lea ecx, [esp + 0x2c]
mov dword [esp + 0x20], ebx
call fcn.00465892
test bl, 8
mov dword [esp + 0x284], ebp
je 0x4214f0
lea ecx, [esp + 0x24]
call fcn.00465892
mov eax, dword [0x49a15c]
push 0
push 0x498b18
push 0x498b18
push 0
push eax
call fcn.004420f7
add esp, 0x14
test eax, eax
jne 0x421526
mov ecx, dword [0x49a15c]
mov dword [0x49a15c], 0x49e1e0
mov dword [0x49e210], ecx
push 0x498b0c
lea ecx, [esp + 0x18]
call fcn.00465900
push 0x499a3c
lea ecx, [esp + 0x1c]
mov byte [esp + 0x288], 0x10
call fcn.00465900
mov ecx, dword [0x49a15c]
push 0
push esi
lea edx, [esp + 0x1c]
push 0x26f
lea eax, [esp + 0x24]
push edx
push eax
mov byte [esp + 0x298], 0x11
call fcn.00429ee0
lea ecx, [esp + 0x18]
mov byte [esp + 0x284], 0x10
call fcn.00465892
lea ecx, [esp + 0x14]
mov byte [esp + 0x284], 9
call fcn.00465892
lea ecx, [esp + 0x10]
push ecx
mov ecx, dword [0x49a15c]
call fcn.00429f60
mov ecx, dword [0x49a15c]
call fcn.0042a9e0
mov ecx, dword [0x49a15c]
call fcn.0042a040
lea ecx, [esp + 0x10]
mov dword [esp + 0x284], 0xffffffff
call fcn.00465892
jmp 0x421d18
call dword [sym.imp.kernel32.dll_GetLastError]
mov edx, dword [0x49aec0]
mov esi, eax
mov dword [esp + 0x10], edx
lea eax, [esp + 0x1c]
mov ebp, 0x12
push 0x5335
push eax
mov dword [esp + 0x28c], ebp
call fcn.0042ba30
mov ecx, dword [esp + 0x30]
mov eax, dword [eax]
push 0
mov byte [esp + 0x290], 0x13
mov edx, dword [ecx + 0x18]
push edx
push eax
lea eax, [esp + 0x24]
push eax
call fcn.004638af
add esp, 0x18
lea ecx, [esp + 0x1c]
mov byte [esp + 0x284], 0x12
call fcn.00465892
mov ecx, dword [esp + 0x10]
mov edi, 0x17
push esi
mov eax, dword [ecx - 8]
test eax, eax
jne 0x421673
lea edx, [esp + 0x28]
push edx
call fcn.0042b940
mov ebx, 0x40
mov dword [esp + 0x28], ebx
mov eax, dword [eax]
lea ecx, [esp + 0x18]
push eax
push 0x498ca4
push ecx
mov byte [esp + 0x298], 0x16
call fcn.004638af
add esp, 0x14
jmp 0x4216bd
lea edx, [esp + 0x30]
push edx
call fcn.0042b940
add esp, 8
mov dword [esp + 0x20], 0x80
push eax
lea eax, [esp + 0x20]
push 0x498ca0
push eax
mov dword [esp + 0x290], edi
call fcn.00465b9b
mov ebx, 0x180
mov dword [esp + 0x20], ebx
push eax
lea ecx, [esp + 0x14]
mov dword [esp + 0x288], 0x18
call fcn.00465caa
test bh, 1
mov dword [esp + 0x284], edi
je 0x4216d9
and bh, 0xfe
lea ecx, [esp + 0x1c]
mov dword [esp + 0x20], ebx
call fcn.00465892
test bl, 0x80
mov dword [esp + 0x284], 0x16
je 0x4216f9
and bl, 0x7f
lea ecx, [esp + 0x2c]
mov dword [esp + 0x20], ebx
call fcn.00465892
test bl, 0x40
mov dword [esp + 0x284], ebp
je 0x42170e
lea ecx, [esp + 0x24]
call fcn.00465892
mov ecx, dword [0x49a15c]
push 0
push 0x498b18
push 0x498b18
push 0
push ecx
call fcn.004420f7
add esp, 0x14
test eax, eax
jne 0x421745
mov edx, dword [0x49a15c]
mov dword [0x49a15c], 0x49e1e0
mov dword [0x49e210], edx
push 0x498b0c
lea ecx, [esp + 0x18]
call fcn.00465900
mov bl, 0x19
push 0x499a3c
lea ecx, [esp + 0x1c]
mov byte [esp + 0x288], bl
call fcn.00465900
push 0
push esi
lea eax, [esp + 0x1c]
push 0x275
lea ecx, [esp + 0x24]
push eax
push ecx
mov ecx, dword [0x49a15c]
mov byte [esp + 0x298], 0x1a
call fcn.00429ee0
lea ecx, [esp + 0x18]
mov byte [esp + 0x284], bl
call fcn.00465892
lea ecx, [esp + 0x14]
mov byte [esp + 0x284], 0x12
call fcn.00465892
mov ecx, dword [0x49a15c]
lea edx, [esp + 0x10]
push edx
call fcn.00429f60
mov ecx, dword [0x49a15c]
call fcn.0042a9e0
mov ecx, dword [0x49a15c]
call fcn.0042a040
lea ecx, [esp + 0x10]
mov dword [esp + 0x284], 0xffffffff
call fcn.00465892
jmp 0x421d18
push 0x49dd08
lea ecx, [esp + 0x14]
call fcn.00465952
push 0x49dd08
lea ecx, [esp + 0x1c]
mov dword [esp + 0x288], 0x1b
call fcn.00465952
lea eax, [esp + 0x10]
push 0
lea ecx, [esp + 0x1c]
push eax
push ecx
push 0x46
push 0
lea ecx, [esp + 0x48]
mov byte [esp + 0x298], 0x1c
call fcn.0042eba0
lea ecx, [esp + 0x18]
mov byte [esp + 0x284], 0x1f
call fcn.00465892
lea ecx, [esp + 0x10]
mov byte [esp + 0x284], 0x1e
call fcn.00465892
mov edx, dword [0x49aec0]
mov dword [esp + 0x14], edx
lea eax, [esp + 0x1c]
mov bl, 0x20
push 0x533b
push eax
mov byte [esp + 0x28c], bl
call fcn.0042ba30
mov ecx, dword [esp + 0x30]
mov eax, dword [eax]
push 0
mov byte [esp + 0x290], 0x21
mov edx, dword [ecx + 0x18]
push edx
push eax
lea eax, [esp + 0x28]
push eax
call fcn.004638af
add esp, 0x18
lea ecx, [esp + 0x1c]
mov byte [esp + 0x284], bl
call fcn.00465892
mov ecx, dword [0x49a15c]
push 0
push 0x498b18
push 0x498b18
push 0
push ecx
call fcn.004420f7
add esp, 0x14
test eax, eax
jne 0x4218e4
mov edx, dword [0x49a15c]
mov dword [0x49a15c], 0x49e1e0
mov dword [0x49e210], edx
push 0x498b0c
lea ecx, [esp + 0x28]
call fcn.00465900
push 0x499a3c
lea ecx, [esp + 0x2c]
mov byte [esp + 0x288], 0x24
call fcn.00465900
push 0
push 0x533b
lea eax, [esp + 0x2c]
push 0x290
lea ecx, [esp + 0x34]
push eax
push ecx
mov ecx, dword [0x49a15c]
mov byte [esp + 0x298], 0x25
call fcn.00429ee0
lea ecx, [esp + 0x28]
mov byte [esp + 0x284], 0x24
call fcn.00465892
lea ecx, [esp + 0x24]
mov byte [esp + 0x284], bl
call fcn.00465892
mov ecx, dword [0x49a15c]
lea edx, [esp + 0x14]
push edx
call fcn.00429f60
mov ecx, dword [0x49a15c]
call fcn.0042a9e0
mov ecx, dword [0x49a15c]
call fcn.0042a040
lea ecx, [esp + 0x14]
mov byte [esp + 0x284], 0x1e
call fcn.00465892
mov dword [esp + 0x284], 0xffffffff
lea ecx, [esp + 0x34]
jmp 0x421d13
push 0x49dd08
lea ecx, [esp + 0x1c]
call fcn.00465952
push 0x49dd08
lea ecx, [esp + 0x28]
mov dword [esp + 0x288], 0x26
call fcn.00465952
lea eax, [esp + 0x18]
push 0
lea ecx, [esp + 0x28]
push eax
push ecx
push 0x46
push 0
lea ecx, [esp + 0x48]
mov byte [esp + 0x298], 0x27
call fcn.0042eba0
lea ecx, [esp + 0x24]
mov byte [esp + 0x284], 0x2a
call fcn.00465892
lea ecx, [esp + 0x18]
mov byte [esp + 0x284], 0x29
call fcn.00465892
mov edx, dword [0x49aec0]
mov dword [esp + 0x14], edx
lea eax, [esp + 0x1c]
mov bl, 0x2b
push 0x533b
push eax
mov byte [esp + 0x28c], bl
call fcn.0042ba30
mov ecx, dword [esp + 0x30]
mov eax, dword [eax]
push 0
mov byte [esp + 0x290], 0x2c
mov edx, dword [ecx + 0x18]
push edx
push eax
lea eax, [esp + 0x28]
push eax
call fcn.004638af
add esp, 0x18
lea ecx, [esp + 0x1c]
mov byte [esp + 0x284], bl
call fcn.00465892
mov ecx, dword [0x49a15c]
push 0
push 0x498b18
push 0x498b18
push 0
push ecx
call fcn.004420f7
add esp, 0x14
test eax, eax
jne 0x421a92
mov edx, dword [0x49a15c]
mov dword [0x49a15c], 0x49e1e0
mov dword [0x49e210], edx
push 0x498b0c
lea ecx, [esp + 0x14]
call fcn.00465900
push 0x499a3c
lea ecx, [esp + 0x2c]
mov byte [esp + 0x288], 0x2f
call fcn.00465900
push 0
push 0x533b
lea eax, [esp + 0x18]
push 0x298
lea ecx, [esp + 0x34]
push eax
push ecx
mov ecx, dword [0x49a15c]
mov byte [esp + 0x298], 0x30
call fcn.00429ee0
lea ecx, [esp + 0x28]
mov byte [esp + 0x284], 0x2f
call fcn.00465892
lea ecx, [esp + 0x10]
mov byte [esp + 0x284], bl
call fcn.00465892
mov ecx, dword [0x49a15c]
lea edx, [esp + 0x14]
push edx
call fcn.00429f60
mov ecx, dword [0x49a15c]
call fcn.0042a9e0
mov ecx, dword [0x49a15c]
call fcn.0042a040
lea ecx, [esp + 0x14]
mov byte [esp + 0x284], 0x29
call fcn.00465892
mov dword [esp + 0x284], 0xffffffff
lea ecx, [esp + 0x34]
jmp 0x421d13
test ebp, ebp
je 0x421b6c
mov ecx, dword [esp + 0x24]
add eax, ecx
mov edx, dword [esp + eax + 0x6c]
mov eax, dword [esp + 0x294]
mov dword [eax], edx
mov eax, 1
jmp 0x421d1a
push 0x49dd08
lea ecx, [esp + 0x1c]
call fcn.00465952
push 0x49dd08
lea ecx, [esp + 0x28]
mov dword [esp + 0x288], 0x31
call fcn.00465952
lea ecx, [esp + 0x18]
push 0
lea edx, [esp + 0x28]
push ecx
push edx
push 0x46
push 0
lea ecx, [esp + 0x64]
mov byte [esp + 0x298], 0x32
call fcn.0042eba0
lea ecx, [esp + 0x24]
mov byte [esp + 0x284], 0x35
call fcn.00465892
lea ecx, [esp + 0x18]
mov byte [esp + 0x284], 0x34
call fcn.00465892
mov eax, dword [0x49aec0]
mov dword [esp + 0x20], eax
lea ecx, [esp + 0x1c]
mov bl, 0x36
push 0x533b
push ecx
mov byte [esp + 0x28c], bl
call fcn.0042ba30
mov edx, dword [esp + 0x30]
mov eax, dword [eax]
push 0
mov byte [esp + 0x290], 0x37
mov ecx, dword [edx + 0x18]
lea edx, [esp + 0x2c]
push ecx
push eax
push edx
call fcn.004638af
add esp, 0x18
lea ecx, [esp + 0x1c]
mov byte [esp + 0x284], bl
call fcn.00465892
mov eax, dword [0x49a15c]
push 0
push 0x498b18
push 0x498b18
push 0
push eax
call fcn.004420f7
add esp, 0x14
test eax, eax
jne 0x421c5f
mov ecx, dword [0x49a15c]
mov dword [0x49a15c], 0x49e1e0
mov dword [0x49e210], ecx
push 0x498b0c
lea ecx, [esp + 0x20]
call fcn.00465900
push 0x499a3c
lea ecx, [esp + 0x30]
mov byte [esp + 0x288], 0x3a
call fcn.00465900
mov ecx, dword [0x49a15c]
push 0
push 0x533b
lea edx, [esp + 0x24]
push 0x2b0
lea eax, [esp + 0x38]
push edx
push eax
mov byte [esp + 0x298], 0x3b
call fcn.00429ee0
lea ecx, [esp + 0x2c]
mov byte [esp + 0x284], 0x3a
call fcn.00465892
lea ecx, [esp + 0x1c]
mov byte [esp + 0x284], bl
call fcn.00465892
lea ecx, [esp + 0x20]
push ecx
mov ecx, dword [0x49a15c]
call fcn.00429f60
mov ecx, dword [0x49a15c]
call fcn.0042a9e0
mov ecx, dword [0x49a15c]
call fcn.0042a040
lea ecx, [esp + 0x20]
mov byte [esp + 0x284], 0x34
call fcn.00465892
mov dword [esp + 0x284], 0xffffffff
lea ecx, [esp + 0x50]
call fcn.0042ecb0
xor eax, eax
mov ecx, dword [esp + 0x27c]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x278
ret 0xc