Function at 0x462440
Capabilities:
Extract resource via kernel32 functions
Read file on windows

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x43c
test eax, eax
push ebx
push ebp
push esi
push edi
je 0x4626de
mov ebx, dword [esp + 0x458]
test ebx, ebx
je 0x4626de
mov ebp, dword [esp + 0x454]
test ebp, ebp
je 0x4626de
mov dword [ebp], 0
xor esi, esi
lea edi, [esp + 0x4d]
mov eax, esi
add edi, 4
shr eax, 5
and eax, 7
mov ecx, eax
shl ecx, 8
sub ecx, eax
mov eax, 0x24924925
mul ecx
sub ecx, edx
mov eax, esi
shr ecx, 1
add ecx, edx
shr eax, 2
shr ecx, 2
and eax, 7
mov byte [edi - 5], cl
mov ecx, eax
shl ecx, 8
sub ecx, eax
mov eax, 0x24924925
mul ecx
sub ecx, edx
mov eax, esi
shr ecx, 1
add ecx, edx
and eax, 3
shr ecx, 2
mov byte [edi - 4], cl
mov ecx, eax
shl ecx, 8
sub ecx, eax
mov eax, 0xaaaaaaab
mul ecx
shr edx, 1
mov byte [edi - 3], dl
mov byte [edi - 2], 0
inc esi
cmp esi, 0x100
jb 0x462481
push 2
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceA]
test eax, eax
je 0x4625b7
push eax
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
test eax, eax
jne 0x462524
pop edi
pop esi
pop ebp
mov eax, 0x80004005
pop ebx
add esp, 0x43c
ret
mov ecx, dword [eax]
cmp ecx, 0x28
lea edx, [ecx + eax]
jb 0x46254c
mov cx, word [eax + 0xe]
cmp cx, 8
ja 0x46254c
mov eax, dword [eax + 0x20]
test eax, eax
jne 0x462548
mov ebx, 1
shl ebx, cl
jmp 0x46254e
mov ebx, eax
jmp 0x46254e
xor ebx, ebx
test ebx, ebx
jbe 0x462595
lea esi, [esp + 0x4c]
lea edi, [esp + 0x4d]
lea ebp, [esp + 0x4e]
sub esi, edx
sub edi, edx
lea eax, [edx + 1]
sub ebp, edx
lea ecx, [esp + 0x4c]
mov edx, ebx
mov bl, byte [eax + 1]
add eax, 4
mov byte [ecx], bl
mov bl, byte [eax - 4]
mov byte [esi + eax - 4], bl
mov bl, byte [eax - 5]
mov byte [edi + eax - 4], bl
mov byte [eax + ebp - 4], 0
add ecx, 4
dec edx
jne 0x46256d
mov ebp, dword [esp + 0x454]
mov eax, dword [esp + 0x450]
push 0
lea ecx, [esp + 0x50]
push ebp
mov edx, dword [eax]
push ecx
push 4
push eax
call dword [edx + 0x14]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x43c
ret
push 0
push 0
push 3
push 0
push 0
push connect
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x4626bc
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
lea edx, [esp + 0x10]
push 0
push edx
lea eax, [esp + 0x44]
push 0xe
push eax
push esi
call edi
cmp dword [esp + 0x10], 0xe
je 0x46260d
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
mov eax, 0x80004005
pop ebx
add esp, 0x43c
ret
lea ecx, [esp + 0x10]
push 0
mov ebx, 0x28
push ecx
lea edx, [esp + 0x1c]
push ebx
push edx
push esi
call edi
cmp dword [esp + 0x10], ebx
je 0x46263f
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
mov eax, 0x80004005
pop ebx
add esp, 0x43c
ret
lea eax, [esp + 0x10]
push 0
push eax
lea ecx, [esp + 0x54]
push 0x400
push ecx
push esi
call edi
mov eax, dword [esp + 0x10]
push esi
cmp eax, 0x400
je 0x462675
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
mov eax, 0x80004005
pop ebx
add esp, 0x43c
ret
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esp + 0x14], ebx
je 0x462685
xor edx, edx
jmp 0x4626a2
mov ecx, dword [esp + 0x22]
cmp cx, 8
jbe 0x462693
xor edx, edx
jmp 0x4626a2
mov edx, dword [esp + 0x34]
test edx, edx
jne 0x4626a4
mov edx, 1
shl edx, cl
test edx, edx
jbe 0x4626bc
lea eax, [esp + 0x4e]
mov esi, edx
mov dl, byte [eax]
mov cl, byte [eax - 2]
mov byte [eax - 2], dl
mov byte [eax], cl
add eax, 4
dec esi
jne 0x4626ac
mov eax, dword [esp + 0x450]
push 0
lea edx, [esp + 0x50]
push ebp
mov ecx, dword [eax]
push edx
push 4
push eax
call dword [ecx + 0x14]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x43c
ret
pop edi
pop esi
pop ebp
mov eax, 0x80070057
pop ebx
add esp, 0x43c
ret