Function at 0x1003e950
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 0x1003ebee
mov ebx, dword [esp + 0x458]
test ebx, ebx
je 0x1003ebee
mov ebp, dword [esp + 0x454]
test ebp, ebp
je 0x1003ebee
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 0x1003e991
push 2
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceA]
test eax, eax
je 0x1003eac7
push eax
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
test eax, eax
jne 0x1003ea34
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 0x1003ea5c
mov cx, word [eax + 0xe]
cmp cx, 8
ja 0x1003ea5c
mov eax, dword [eax + 0x20]
test eax, eax
jne 0x1003ea58
mov ebx, 1
shl ebx, cl
jmp 0x1003ea5e
mov ebx, eax
jmp 0x1003ea5e
xor ebx, ebx
test ebx, ebx
jbe 0x1003eaa5
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 0x1003ea7d
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 closesocket
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x1003ebcc
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 0x1003eb1d
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 0x1003eb4f
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 0x1003eb85
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 0x1003eb95
xor edx, edx
jmp 0x1003ebb2
mov ecx, dword [esp + 0x22]
cmp cx, 8
jbe 0x1003eba3
xor edx, edx
jmp 0x1003ebb2
mov edx, dword [esp + 0x34]
test edx, edx
jne 0x1003ebb4
mov edx, 1
shl edx, cl
test edx, edx
jbe 0x1003ebcc
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 0x1003ebbc
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