Function at 0x46fbc0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x28
push ebx
push ebp
push esi
push edi
mov edi, eax
xor ebp, ebp
push edi
lea esi, [esp + 0x1c]
mov dword [esp + 0x24], ebp
call fcn.0044bc90
mov eax, dword [esp + 0x18]
cmp eax, ebp
je 0x46fbe6
add eax, 4
jmp 0x46fbe8
xor eax, eax
push ebp
lea ecx, [esp + 0x24]
push ecx
push ebp
push ebp
push ebp
push ebp
push eax
push ebp
call sub.urlmon.dll_FindMimeFromData
test eax, eax
jne 0x46fd1f
mov eax, dword [esp + 0x20]
cmp eax, ebp
je 0x46fd1f
push ebp
push ebp
push ebp
push ebp
push 0xffffffffffffffff
push eax
push ebp
push 0xfde9
mov dword [esp + 0x3c], eax
mov dword [esp + 0x34], ebp
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov esi, eax
cmp esi, ebp
je 0x46fc31
sub esi, 1
lea ebx, [esi + 1]
cmp ebx, ebp
jne 0x46fc77
mov dword [esp + 0x14], ebp
xor edi, edi
mov eax, dword [esp + 0x1c]
push 0
push 0
push ebx
push edi
push 0xffffffffffffffff
push eax
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test ebp, ebp
mov byte [edi + esi], 0
je 0x46fc9e
lea edi, [ebp + 4]
test edi, edi
je 0x46fc90
mov esi, str.image_pjpeg
mov ecx, 0xc
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jmp 0x46fcb0
push ebp
push ebx
lea edx, [esp + 0x1c]
push edx
call fcn.00449c70
mov ebp, dword [esp + 0x14]
test ebp, ebp
je 0x46fc3c
lea edi, [ebp + 4]
jmp 0x46fc3e
test dword [ebp], 0xffffff00
je 0x46fc9e
cmp byte [edi], 0
jne 0x46fca9
cmp byte [str.image_pjpeg], 0
jne 0x46fce6
jmp 0x46fcb7
xor eax, eax
cmp eax, str.image_pjpeg
sete al
test al, al
je 0x46fce6
push str.image_jpeg
mov eax, 0xa
lea edi, [esp + 0x20]
mov dword [esp + 0x20], 0
call fcn.0044a090
mov esi, edi
lea eax, [esp + 0x14]
call fcn.004010e0
call fcn.00401070
mov ebp, dword [esp + 0x14]
test ebp, ebp
mov esi, dword [esp + 0x3c]
mov dword [esi], ebp
je 0x46fd03
movzx ecx, byte [ebp]
cmp ecx, 0x80
jae 0x46fd03
push ebp
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
lea edi, [esp + 0x14]
call fcn.00401070
lea edi, [esp + 0x18]
call fcn.00401070
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret
push 0x2000
push 0x5586a8
push edi
lea edx, [esp + 0x30]
push edx
mov dword [esp + 0x34], ebp
mov dword [esp + 0x38], ebp
mov byte [esp + 0x3d], 0
mov byte [esp + 0x3c], 0
mov dword [esp + 0x40], 2
mov dword [esp + 0x44], ebp
call fcn.0046d460
mov eax, dword [esp + 0x28]
cmp eax, ebp
je 0x46fdc8
push eax
push 1
lea eax, [esp + 0x24]
push 4
push eax
mov dword [esp + 0x2c], ebp
call fcn.0052edba
add esp, 0x10
test eax, eax
je 0x46fdc8
mov eax, dword [esp + 0x1c]
call fcn.0046fe20
cmp eax, ebp
je 0x46fdc8
mov edx, eax
call fcn.0046f9e0
cmp eax, ebp
mov esi, dword [esp + 0x3c]
mov dword [esi], ebp
je 0x46fdac
mov ecx, eax
lea edi, [ecx + 1]
mov dl, byte [ecx]
add ecx, 1
test dl, dl
jne 0x46fd97
sub ecx, edi
push eax
mov eax, ecx
mov edi, esi
call fcn.0044a090
lea eax, [esp + 0x24]
call fcn.00408080
lea edi, [esp + 0x18]
call fcn.00401070
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret
mov ebx, dword [esp + 0x3c]
push str.application_octet_stream
mov eax, 0x18
mov edi, ebx
mov dword [ebx], ebp
call fcn.0044a090
mov esi, dword [esp + 0x24]
cmp esi, ebp
je 0x46fdff
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
cmp eax, ebp
jne 0x46fe08
push esi
call fcn.0044d390
add esp, 4
mov dword [esp + 0x24], ebp
lea esi, [esp + 0x24]
call fcn.0046dc30
lea edi, [esp + 0x18]
call fcn.00401070
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 0x28
ret