Function at 0x10012440
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100703b7
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x44
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x10], esp
mov dword [ebp - 4], ebx
mov dword [ebp - 0x14], ebx
mov eax, 0x10085f68
mov byte [ebp - 4], 1
test eax, eax
je 0x10012801
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
inc esi
lea eax, [esi + esi]
add eax, 3
and al, 0xfc
call fcn.1006e670
mov edi, esp
push esi
push edi
push 0xffffffffffffffff
push 0x10085f68
push ebx
push ebx
mov word [edi], bx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jne 0x100124c9
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
jg 0x100124bb
call esi
jmp 0x100124d5
call esi
and eax, 0xffff
or eax, 0x80070000
jmp 0x100124d5
push 0x17
push ebx
push edi
lea ecx, [ebp - 0x14]
call fcn.10015b70
cmp eax, ebx
jl 0x10012801
mov eax, dword [ebp - 0x14]
cmp eax, ebx
jne 0x100124f1
push 0x80004003
call fcn.1006e336
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax]
push ebx
push eax
mov esi, eax
call dword [ecx + 0xfc]
cmp eax, ebx
jge 0x1001250d
push 0x10085f58
push esi
push eax
call fcn.1006e344
mov edi, dword [ebp + 8]
mov word [ebp - 0x40], 8
push edi
call fcn.1006e3e3
cmp eax, ebx
mov dword [ebp - 0x38], eax
jne 0x10012531
cmp edi, ebx
je 0x10012531
push 0x8007000e
call fcn.1006e336
mov eax, dword [ebp - 0x14]
mov byte [ebp - 4], 2
cmp eax, ebx
jne 0x10012549
push 0x80004003
call fcn.1006e336
mov eax, dword [ebp - 0x14]
mov ebx, dword [ebp - 0x40]
lea ecx, [ebp + 0xa]
push ecx
mov edx, dword [eax]
sub esp, 0x10
mov esi, eax
mov ecx, esp
push eax
mov dword [ecx], ebx
mov ebx, dword [ebp - 0x3c]
mov dword [ecx + 4], ebx
mov ebx, dword [ebp - 0x38]
mov dword [ecx + 8], ebx
mov ebx, dword [ebp - 0x34]
mov dword [ecx + 0xc], ebx
call dword [edx + 0xe8]
test eax, eax
jge 0x10012584
push 0x10085f58
push esi
push eax
call fcn.1006e344
cmp word [ebp + 0xa], 0
lea edx, [ebp - 0x40]
push edx
mov byte [ebp - 4], 1
sete bl
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
test eax, eax
jge 0x100125a4
push eax
call fcn.1006e336
test bl, bl
je 0x1001272a
push 0
push 0x80
push 3
push 0
push 1
push closesocket
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
mov dword [ebp + 8], ebx
cmp ebx, 0xffffffff
mov byte [ebp - 4], 3
je 0x10012801
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
lea eax, [esi + 1]
push eax
call fcn.1003bfe0
add esp, 4
mov dword [ebp - 0x34], eax
test eax, eax
setne cl
mov byte [ebp - 0x38], cl
lea edx, [ebp - 0x30]
push 0
push edx
push esi
push eax
push ebx
mov byte [ebp - 4], 4
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1001278a
mov eax, dword [ebp - 0x34]
lea ecx, [ebp - 0x38]
mov byte [eax + esi], 0
call fcn.10015560
push ecx
mov esi, eax
mov dword [ebp - 0x2c], esp
mov edi, esp
push 0xc
call fcn.1003bfe0
mov ecx, eax
add esp, 4
mov dword [ebp - 0x28], ecx
test ecx, ecx
mov byte [ebp - 4], 5
je 0x1001264a
push esi
call fcn.10015570
jmp 0x1001264c
xor eax, eax
test eax, eax
mov byte [ebp - 4], 4
mov dword [edi], eax
jne 0x10012660
push 0x8007000e
call fcn.1006e336
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 6
call fcn.100155b0
mov ecx, eax
mov byte [ebp - 4], 4
call fcn.100151f0
test ax, ax
jne 0x10012710
mov ecx, dword [ebp - 0x34]
push 1
push 0x26
push ecx
call fcn.10014e80
add esp, 0xc
lea ecx, [ebp - 0x38]
call fcn.10015560
push ecx
mov esi, eax
mov dword [ebp - 0x2c], esp
mov edi, esp
push 0xc
call fcn.1003bfe0
mov ecx, eax
add esp, 4
mov dword [ebp - 0x28], ecx
test ecx, ecx
mov byte [ebp - 4], 7
je 0x100126bf
push esi
call fcn.10015570
jmp 0x100126c1
xor eax, eax
test eax, eax
mov byte [ebp - 4], 4
mov dword [edi], eax
jne 0x100126d5
push 0x8007000e
call fcn.1006e336
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 8
call fcn.100155b0
mov ecx, eax
mov byte [ebp - 4], 4
call fcn.100151f0
test ax, ax
jne 0x10012710
mov al, byte [ebp - 0x38]
test al, al
je 0x10012704
mov edx, dword [ebp - 0x34]
push edx
call fcn.1003c010
add esp, 4
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x10012801
mov al, byte [ebp - 0x38]
test al, al
je 0x10012723
mov eax, dword [ebp - 0x34]
push eax
call fcn.1003c010
add esp, 4
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x18], 0
mov eax, dword [ebp - 0x14]
mov byte [ebp - 4], 9
test eax, eax
jne 0x10012746
push 0x80004003
call fcn.1006e336
mov ecx, dword [ebp - 0x14]
lea edx, [ebp + 8]
push edx
call fcn.10015000
mov eax, dword [eax]
lea ecx, [ebp - 0x18]
push eax
call fcn.10015c80
lea ecx, [ebp + 8]
call fcn.10002fd0
mov ecx, dword [ebp - 0x18]
test ecx, ecx
je 0x100127f9
lea edx, [ebp + 8]
push edx
call fcn.10014eb0
mov ecx, dword [eax]
mov byte [ebp - 4], 0xa
test ecx, ecx
je 0x100127a6
call fcn.10015630
jmp 0x100127a8
mov al, byte [ebp - 0x38]
test al, al
je 0x1001279d
mov ecx, dword [ebp - 0x34]
push ecx
call fcn.1003c010
add esp, 4
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x10012801
xor eax, eax
push 0x10085fa4
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
lea ecx, [ebp + 8]
mov byte [ebp - 4], 9
setne bl
call fcn.1000f220
test bl, bl
jne 0x100127f9
mov eax, dword [ebp - 0x18]
test eax, eax
jne 0x100127da
push 0x80004003
call fcn.1006e336
mov ecx, dword [ebp - 0x18]
lea eax, [ebp - 0x1c]
push eax
call fcn.10014fb0
mov eax, dword [ebp - 0x1c]
mov byte [ebp - 4], 0xb
test eax, eax
jne 0x1001281f
lea ecx, [ebp - 0x1c]
call fcn.10002fd0
lea ecx, [ebp - 0x18]
call fcn.10002fd0
lea ecx, [ebp - 0x14]
call fcn.10002fd0
xor eax, eax
mov ecx, dword [ebp - 0xc]
lea esp, [ebp - 0x5c]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor esi, esi
test eax, eax
jne 0x10012832
push 0x80004003
call fcn.1006e336
mov eax, dword [ebp - 0x1c]
mov ecx, dword [eax]
lea edx, [ebp - 0x24]
push edx
push eax
mov edi, eax
call dword [ecx + 0x20]
test eax, eax
jge 0x1001284e
push 0x10085f48
push edi
push eax
call fcn.1006e344
cmp esi, dword [ebp - 0x24]
jge 0x100129ff
mov eax, dword [ebp - 0x1c]
test eax, eax
jne 0x10012868
push 0x80004003
call fcn.1006e336
mov ecx, dword [ebp - 0x1c]
lea eax, [ebp - 0x28]
push esi
push eax
call fcn.100150a0
mov ecx, dword [eax]
push ecx
lea ecx, [ebp - 0x18]
call fcn.10015c80
lea ecx, [ebp - 0x28]
call fcn.10002fd0
mov ecx, dword [ebp - 0x18]
test ecx, ecx
je 0x100129f6
lea edx, [ebp - 0x30]
push edx
call fcn.10014eb0
mov ecx, dword [eax]
mov byte [ebp - 4], 0xc
test ecx, ecx
je 0x100128ad
call fcn.10015630
jmp 0x100128af
xor eax, eax
push str.entry
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x1001290c
mov eax, dword [ebp - 0x18]
test eax, eax
jne 0x100128d0
push 0x80004003
call fcn.1006e336
mov ecx, dword [ebp - 0x18]
lea eax, [ebp - 0x2c]
push eax
call fcn.10014eb0
mov ecx, dword [eax]
mov byte [ebp - 4], 0xd
test ecx, ecx
je 0x100128ed
call fcn.10015630
jmp 0x100128ef
xor eax, eax
push str.Entry
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
lea ecx, [ebp - 0x2c]
sete bl
call fcn.1000f220
test bl, bl
je 0x1001290e
mov bl, 1
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 0xb
call fcn.1000f220
test bl, bl
je 0x100129f6
mov ecx, dword [ebp - 0x18]
lea edx, [ebp - 0x20]
push ecx
push 0x10085f90
push edx
call fcn.100147c0
add esp, 0xc
mov eax, dword [ebp - 0x20]
mov byte [ebp - 4], 0xe
test eax, eax
je 0x100129ea
push eax
lea eax, [ebp + 8]
push str.href
push eax
call fcn.100149a0
add esp, 0xc
mov eax, dword [ebp + 8]
mov byte [ebp - 4], 0xf
test eax, eax
je 0x100129e2
mov eax, dword [eax]
test eax, eax
je 0x100129e2
push eax
call dword [sym.imp.OLEAUT32.dll_VariantInit]
test eax, eax
je 0x100129e2
mov ecx, dword [ebp + 8]
test ecx, ecx
je 0x10012982
call fcn.10015630
jmp 0x10012984
xor eax, eax
push 0x26
push 1
push eax
call fcn.10014e80
mov cl, byte [ebp + 0xb]
add esp, 0xc
mov byte [ebp - 0x50], cl
lea ecx, [ebp - 0x50]
push 0
mov ebx, eax
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push ebx
lea ecx, [ebp - 0x50]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_char_const___unsigned_int_]
mov ecx, dword [ebp + 0xc]
lea edx, [ebp - 0x50]
push edx
mov byte [ebp - 4], 0x10
mov eax, dword [ecx + 4]
push eax
lea eax, [ebp - 0x34]
push eax
call fcn.10015840
push 1
lea ecx, [ebp - 0x50]
mov byte [ebp - 4], 0xf
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
lea ecx, [ebp + 8]
call fcn.1000f220
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 0xb
call fcn.10002fd0
mov eax, dword [ebp - 0x1c]
inc esi
jmp 0x10012821
lea ecx, [ebp - 0x1c]
call fcn.10002fd0
mov eax, dword [ebp - 0x18]
mov byte [ebp - 4], 1
test eax, eax
je 0x10012a18
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [ebp - 0x14]
mov byte [ebp - 4], 0
test eax, eax
je 0x10012a29
mov edx, dword [eax]
push eax
call dword [edx + 8]
mov eax, 1
jmp 0x1001280b