Function at 0x4182a4
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
mov eax, dword [ebp + 0x14]
mov eax, dword [eax]
push ebx
push esi
mov esi, dword [sym.imp.SHLWAPI.dll_StrChrW]
push edi
mov edi, dword [ebp + 0x10]
xor ebx, ebx
cmp word [eax + 2], bx
push 0x7c
setne al
push edi
mov byte [ebp - 0x24], al
mov byte [ebp - 1], 0x7c
call esi
cmp eax, ebx
mov dword [ebp - 0xc], eax
jne 0x418305
push edi
lea ecx, [ebp - 0x14]
call fcn.0042a183
lea eax, [ebp - 0x14]
push eax
call fcn.00431670
test al, al
pop ecx
jle 0x4182fa
push 0x2b
push edi
mov byte [ebp - 1], 0x2b
call esi
mov dword [ebp - 0xc], eax
lea ecx, [ebp - 0x14]
call fcn.00424686
mov eax, dword [ebp - 0xc]
or dword [ebp - 0x20], 0xffffffff
or dword [ebp - 0x1c], 0xffffffff
cmp eax, ebx
mov esi, eax
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x34], ebx
je 0x418370
mov word [eax], bx
add dword [ebp - 0xc], 2
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0xc]
push eax
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x2c], ebx
call fcn.0042f308
mov eax, dword [ebp - 0x30]
cdq
pop ecx
pop ecx
mov ecx, dword [ebp - 0xc]
mov dword [ebp - 0x38], eax
movsx eax, byte [ebp - 1]
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x2c], ebx
movzx ecx, word [ecx]
cmp eax, ecx
mov dword [ebp - 0x34], edx
jne 0x418366
add dword [ebp - 0xc], 2
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0xc]
push eax
call fcn.0042f308
pop ecx
pop ecx
mov eax, dword [ebp - 0x30]
cdq
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], edx
push edi
lea ecx, [ebp - 0x18]
call fcn.0042a183
cmp esi, ebx
je 0x418382
mov word [esi], 0x2b
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x18]
push eax
mov dword [ebp - 0x28], ebx
call fcn.00431533
pop ecx
pop ecx
mov ecx, dword [ebp + 0x18]
mov byte [ebp - 0x14], al
push ebx
lea eax, [ebp - 0x18]
push eax
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x40], ebx
call fcn.00402996
push ebx
push ebx
push 3
push ebx
push 7
push 0x80000000
push dword [ebp - 0x18]
lea ecx, [ebp - 8]
mov dword [ebp - 8], ebx
call fcn.00403993
cmp dword [ebp - 8], ebx
je 0x4187b2
cmp byte [ebp - 0x14], 0
je 0x4183e4
push dword [ebp - 0x14]
push dword [ebp - 8]
call fcn.00428276
pop ecx
jmp 0x4183ec
push dword [ebp - 8]
call fcn.00409d2d
cmp edx, ebx
pop ecx
mov esi, eax
jl 0x4187b2
jg 0x418401
cmp esi, ebx
jbe 0x4187b2
cmp edx, dword [ebp - 0x34]
jl 0x4187b2
jg 0x418415
cmp esi, dword [ebp - 0x38]
jb 0x4187b2
cmp dword [ebp - 0x34], ebx
jl 0x418427
jg 0x418421
cmp dword [ebp - 0x38], ebx
jbe 0x418427
sub esi, dword [ebp - 0x38]
sbb edx, dword [ebp - 0x34]
cmp edx, ebx
jl 0x41843a
mov eax, 0x10000000
jg 0x418436
cmp esi, eax
jbe 0x41843a
mov esi, eax
xor edx, edx
mov eax, dword [ebp - 0x1c]
cmp eax, ebx
jl 0x418459
jg 0x418448
cmp dword [ebp - 0x20], ebx
jbe 0x418459
cmp edx, eax
jl 0x418459
jg 0x418453
cmp esi, dword [ebp - 0x20]
jbe 0x418459
mov esi, dword [ebp - 0x20]
mov dword [ebp - 0x2c], eax
lea eax, [esi + 0x10]
push eax
lea ecx, [ebp - 0x48]
call fcn.0042459d
mov edi, dword [ebp - 0x48]
cmp edi, ebx
je 0x4187b2
cmp dword [ebp - 0x34], ebx
jl 0x41848d
jg 0x41847c
cmp dword [ebp - 0x38], ebx
jbe 0x41848d
push ebx
push ebx
push dword [ebp - 0x34]
push dword [ebp - 0x38]
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.DLL_SetFilePointerEx]
push ebx
lea eax, [ebp - 0x14]
push eax
push esi
push edi
push dword [ebp - 8]
mov dword [ebp - 0x14], ebx
call dword [sym.imp.KERNEL32.DLL_ReadFile]
mov esi, dword [ebp - 0x14]
cmp esi, ebx
jge 0x4184a9
xor esi, esi
push 0x10
lea eax, [esi + edi]
push ebx
push eax
call fcn.00461780
add esp, 0xc
lea ecx, [ebp - 8]
call fcn.00402905
push dword [ebp + 0x10]
mov ecx, dword [ebp + 0x14]
mov dword [ebp - 0x44], esi
mov dword [ebp - 0x40], esi
call fcn.004246c0
mov ecx, dword [ebp + 0x14]
push 0x476d74
call fcn.004246c0
push ebx
push esi
push dword [ebp - 0x48]
call fcn.00426ea7
add esp, 0xc
test al, al
je 0x41851b
mov eax, dword [ebp - 0x48]
mov dword [ebp - 0x3c], eax
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp - 0x3c]
push eax
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x34], esi
mov dword [ebp - 0x38], esi
call fcn.0042ebe9
pop ecx
pop ecx
lea ecx, [ebp - 0x3c]
call fcn.00424686
lea eax, [ebp - 0x48]
push 1
push eax
call fcn.00433ac4
push dword [ebp - 0x48]
call fcn.0046176a
mov ecx, dword [ebp - 0x48]
add esp, 0xc
cmp byte [ecx], 0
lea esi, [eax + eax]
je 0x4187bd
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x44], eax
lea eax, [esi + 0x10]
push eax
lea ecx, [ebp - 0x48]
call fcn.0042459d
mov eax, dword [ebp - 0x48]
push 0x10
add esi, eax
push ebx
push esi
call fcn.00461780
mov esi, dword [ebp + 8]
mov eax, dword [esi]
mov edi, dword [ebp - 0x48]
add esp, 0xc
cmp eax, ebx
mov dword [ebp - 8], edi
je 0x41857e
push eax
call fcn.0046176a
pop ecx
mov dword [ebp - 0x14], eax
jmp 0x418581
mov dword [ebp - 0x14], ebx
push dword [ebp - 0x24]
mov eax, edi
call fcn.004122c8
cmp word [edi], bx
pop ecx
je 0x4187bd
push edi
call fcn.0046176a
mov edi, eax
mov eax, dword [ebp - 8]
cmp word [eax + edi*2 - 2], 0xa
pop ecx
mov dword [ebp - 0x10], ebx
je 0x4185b3
mov dword [ebp - 0x10], 1
mov eax, dword [ebp - 0x10]
mov ebx, dword [ebp - 0x14]
add eax, edi
add eax, ebx
mov dword [ebp - 0x24], eax
add eax, 0x10
push eax
mov ecx, esi
call fcn.00424699
cmp dword [ebp + 0xc], ebx
jle 0x4185d3
mov dword [ebp + 0xc], ebx
mov ecx, dword [ebp + 0xc]
mov ebx, dword [esi]
lea eax, [ecx + ecx]
add ebx, eax
mov eax, dword [ebp - 0x14]
cmp eax, ecx
jle 0x4185fb
sub eax, ecx
shl eax, 1
push eax
mov eax, dword [ebp - 0x10]
add eax, edi
lea eax, [ebx + eax*2]
push ebx
push eax
call fcn.00461d90
add esp, 0xc
cmp dword [ebp - 0x10], 0
je 0x418607
mov word [ebx + edi*2], 0xa
push edi
push dword [ebp - 8]
push ebx
call fcn.0040391f
mov eax, dword [esi]
mov ecx, dword [ebp - 0x24]
and word [eax + ecx*2], 0
mov eax, dword [esi]
mov ecx, dword [ebp + 0xc]
add ecx, ecx
add ecx, eax
mov dword [ebp - 8], ecx
mov ecx, dword [ebp + 0xc]
add edi, ecx
lea edx, [eax + edi*2]
add esp, 0xc
lea ecx, [ebp - 8]
mov dword [ebp - 0x10], edx
call fcn.0040e58b
mov edi, dword [ebp - 8]
cmp edi, edx
jae 0x4187ae
lea eax, [ebp - 8]
call fcn.0040e4de
push 6
push edi
push str.import
call fcn.004257a3
add esp, 0xc
test al, al
je 0x41879a
lea ebx, [edi + 0xc]
mov ax, word [ebx]
call fcn.004213da
test al, al
je 0x41879a
mov word [edi + 2], 0x2f
mov word [edi], 0x2f
mov edi, dword [ebp - 8]
cmp ebx, edi
jae 0x41879a
mov ax, word [ebx]
call fcn.004213da
test al, al
je 0x4186a3
inc ebx
inc ebx
cmp ebx, edi
jb 0x418691
cmp ebx, edi
jae 0x41879a
lea ecx, [ebp - 0x14]
call fcn.0042460b
push dword [ebp + 0x18]
lea eax, [ebp - 0x14]
push eax
push ebx
call fcn.00412374
add esp, 0xc
mov ebx, 0x476d74
push ebx
lea ecx, [ebp - 0x24]
call fcn.0042a183
push ebx
lea ecx, [ebp - 0x1c]
call fcn.0042a183
push dword [ebp - 0x24]
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 0x14]
lea eax, [ebp - 0x34]
push eax
lea ecx, [ebp - 0x1c]
call fcn.004341ea
mov ecx, eax
call fcn.004341ea
mov eax, dword [eax]
mov ecx, dword [ebp + 0x14]
mov ecx, dword [ecx]
push eax
push ecx
call dword [sym.imp.SHLWAPI.dll_StrStrW]
mov ebx, eax
neg ebx
sbb bl, bl
lea ecx, [ebp - 0x2c]
inc bl
call fcn.00424686
lea ecx, [ebp - 0x34]
call fcn.00424686
lea ecx, [ebp - 0x1c]
call fcn.00424686
lea ecx, [ebp - 0x24]
call fcn.00424686
test bl, bl
je 0x418792
mov ax, word [edi]
cmp ax, 0xd
je 0x418741
cmp ax, 0xa
jne 0x418745
inc edi
inc edi
jmp 0x418732
push dword [ebp + 0x18]
mov ecx, dword [esi]
push dword [ebp + 0x14]
mov ebx, dword [ebp - 0x10]
push dword [ebp - 0x14]
mov dword [ebp - 8], edi
mov eax, dword [ebp - 8]
mov edi, dword [ebp - 0x10]
sub edi, eax
sub eax, ecx
sar eax, 1
push eax
sub ebx, ecx
push esi
sar edi, 1
sar ebx, 1
call fcn.004182a4
mov eax, dword [esi]
lea eax, [eax + ebx*2]
push eax
call fcn.0046176a
mov ecx, dword [esi]
add eax, ebx
lea eax, [ecx + eax*2]
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 0x10]
lea eax, [edi + edi]
add esp, 0x18
sub ecx, eax
mov dword [ebp - 8], ecx
lea ecx, [ebp - 0x14]
call fcn.00424686
lea ecx, [ebp - 8]
call fcn.0040e58b
mov edi, dword [ebp - 8]
cmp edi, dword [ebp - 0x10]
jb 0x418648
xor ebx, ebx
jmp 0x4187bd
lea ecx, [ebp - 8]
call fcn.00402905
xor ebx, ebx
inc ebx
lea ecx, [ebp - 0x48]
call fcn.00424686
lea ecx, [ebp - 0x18]
call fcn.00424686
pop edi
pop esi
mov eax, ebx
pop ebx
leave
ret