Function at 0x40eaae
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x238
mov eax, dword [0x41f0a0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
xor edx, edx
mov dword [ebp - 0x22c], ecx
mov ecx, dword [ebp + 8]
push edi
push 2
push edx
push ecx
mov dword [ebp - 0x238], ecx
mov dword [ebp - 0x224], edx
mov dword [ebp - 0x220], edx
mov dword [ebp - 0x214], edx
mov byte [ebp - 0x215], dl
mov byte [ebp - 0x217], dl
mov byte [ebp - 0x216], dl
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov ebx, eax
mov dword [ebp - 0x230], ebx
test ebx, ebx
je 0x40f15d
xor eax, eax
push eax
push 1
push 0x10
push ebx
call dword [sym.imp.KERNEL32.dll_FindResourceExW]
mov esi, eax
test esi, esi
je 0x40f15d
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x40f15d
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
push esi
push ebx
mov edi, eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov esi, eax
mov dword [ebp - 0x228], esi
cmp esi, 0x5c
jae 0x40eb74
push esi
push 0x404628
xor eax, eax
push eax
push dword [ebp - 0x238]
call fcn.0040cff7
jmp 0x40f172
test edi, edi
je 0x40f15d
push 0x402aa0
push esi
call fcn.0041d3c6
mov ebx, eax
mov dword [ebp - 0x220], ebx
pop ecx
pop ecx
test ebx, ebx
jne 0x40eba5
call fcn.0040d097
mov ebx, dword [ebp - 0x230]
jmp 0x40f175
push esi
push edi
push ebx
call sub.msvcrt.dll_memcpy
mov eax, dword [ebp - 0x230]
add esp, 0xc
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
movzx eax, word [ebx]
xor ecx, ecx
mov edx, eax
mov dword [ebp - 0x230], ecx
add eax, 8
mov word [ebx], ax
lea eax, [edx + 8]
mov dword [ebp - 0x21c], eax
test edx, edx
je 0x40f189
lea edi, [ebx + 6]
mov ecx, 0x4046a0
mov eax, edi
mov si, word [eax]
cmp si, word [ecx]
jne 0x40ec13
test si, si
je 0x40ec0d
mov si, word [eax + 2]
cmp si, word [ecx + 2]
jne 0x40ec13
add eax, 4
add ecx, 4
test si, si
jne 0x40ebeb
xor ecx, ecx
mov eax, ecx
jmp 0x40ec1a
sbb eax, eax
or eax, 1
xor ecx, ecx
test eax, eax
je 0x40ec7a
push edi
push 0x4046c0
push ecx
push 0x402b04
call fcn.0040cff7
add esp, 0x10
mov esi, dword [ebp - 0x214]
mov eax, dword [ebp - 0x220]
test eax, eax
je 0x40ec49
push eax
call sub.msvcrt.dll_free
pop ecx
test esi, esi
je 0x40ec54
push esi
call sub.msvcrt.dll_free
pop ecx
mov al, byte [ebp - 0x216]
and al, byte [ebp - 0x217]
test byte [ebp - 0x215], al
mov ecx, dword [ebp - 4]
pop edi
setne al
xor ecx, ebp
pop esi
pop ebx
call fcn.0041d1b0
leave
ret 0xc
mov eax, dword [ebx + 0x30]
lea esi, [ebx + 0x5c]
sub edx, 0x5c
mov dword [0x41f52c], eax
mov dword [0x41f528], ecx
test edx, edx
jle 0x40ec32
mov ecx, dword [ebp - 0x228]
add ecx, ebx
mov dword [ebp - 0x234], ecx
lea eax, [esi + 8]
cmp eax, ecx
ja 0x40ed37
mov ecx, 0x4047d8
lea eax, [esi + 6]
mov di, word [eax]
cmp di, word [ecx]
jne 0x40ecd9
test di, di
je 0x40ecd5
mov di, word [eax + 2]
cmp di, word [ecx + 2]
jne 0x40ecd9
add eax, 4
add ecx, 4
test di, di
jne 0x40ecb3
xor eax, eax
jmp 0x40ecde
sbb eax, eax
or eax, 1
movzx ecx, word [esi]
mov edi, ecx
test eax, eax
je 0x40ed0b
lea eax, [ecx + 3]
and eax, 0xfffc
je 0x40ec32
mov ecx, dword [ebp - 0x234]
movzx eax, ax
sub edx, eax
add esi, eax
test edx, edx
jg 0x40eca0
jmp 0x40ec32
lea eax, [ecx + 8]
sub edi, 0x24
push ecx
mov ecx, dword [ebp + 0xc]
lea edx, [ebp - 0x10]
mov word [esi], ax
add esi, 0x24
call fcn.004128ef
mov eax, dword [ebp - 0x228]
sub eax, esi
sub eax, ebx
push 8
sub eax, 0xa
pop edx
cmp eax, edx
jae 0x40ed51
push 0x404748
xor eax, eax
push eax
push 0x402b04
call fcn.0040cff7
add esp, 0xc
jmp 0x40ec32
mov eax, dword [ebp - 0x10]
lea ecx, [esi + 6]
add word [esi], dx
lea edx, [ecx + 2]
mov dword [ecx], eax
xor ebx, ebx
mov eax, dword [ebp - 0xc]
mov dword [ecx + 4], eax
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x40ed67
sub ecx, edx
sar ecx, 1
lea eax, [ecx*2 + 0xb]
mov ecx, 0xfffc
and eax, ecx
add esi, eax
test edi, edi
jle 0x40f190
lea eax, [esi + 8]
cmp eax, dword [ebp - 0x234]
ja 0x40ed37
lea ebx, [esi + 6]
mov ecx, 0x4047f8
mov eax, ebx
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40edc9
test dx, dx
je 0x40edc5
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40edc9
add eax, 4
add ecx, 4
test dx, dx
jne 0x40eda3
xor eax, eax
jmp 0x40edce
sbb eax, eax
or eax, 1
test eax, eax
je 0x40edfa
mov ax, word [esi]
mov ecx, 0xfffc
add ax, 3
and ax, cx
movzx eax, ax
test ax, ax
je 0x40ec32
sub edi, eax
add esi, eax
test edi, edi
jg 0x40ed8e
jmp 0x40ec32
push 0x402aa0
push dword [ebp - 0x21c]
mov edi, esi
sub edi, dword [ebp - 0x220]
call fcn.0041d3c6
mov dword [ebp - 0x214], eax
pop ecx
pop ecx
test eax, eax
jne 0x40ee28
call fcn.0040d097
jmp 0x40ec32
push dword [ebp - 0x21c]
xor ecx, ecx
push ecx
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
cmp edi, dword [ebp - 0x21c]
jg 0x40f153
push edi
push dword [ebp - 0x220]
push dword [ebp - 0x214]
call sub.msvcrt.dll_memcpy
add esp, 0xc
lea ecx, [ebx + 2]
push 8
pop eax
add word [esi], ax
push 4
pop eax
add word [esi + 2], ax
xor edx, edx
mov ax, word [ebx]
add ebx, 2
cmp ax, dx
jne 0x40ee6d
sub ebx, ecx
mov ecx, 0xfffc
sar ebx, 1
lea eax, [ebx*2 + 0xb]
and eax, ecx
movzx ecx, ax
lea eax, [ecx + edi]
lea ebx, [ecx + esi]
mov dword [ebp - 0x234], eax
cmp eax, dword [ebp - 0x21c]
ja 0x40f148
mov eax, dword [ebp - 0x220]
sub eax, esi
add eax, dword [ebp - 0x228]
cmp eax, ecx
jb 0x40f148
push ecx
push esi
mov esi, dword [ebp - 0x214]
lea eax, [edi + esi]
push eax
call sub.msvcrt.dll_memcpy
mov eax, dword [ebp - 0x220]
add esp, 0xc
mov edi, dword [ebp - 0x228]
sub eax, ebx
add eax, edi
cmp eax, 2
jl 0x40f12e
push 0x2e
push ebx
call dword [sym.imp.msvcrt.dll_wcschr]
pop ecx
pop ecx
test eax, eax
je 0x40ec38
mov ax, word [eax + 2]
sub ax, 0x61
cmp ax, 0x19
lea eax, [ebp - 0x210]
push ebx
ja 0x40ef17
push 0x4048b8
jmp 0x40ef1c
push 0x4048c8
push 0x100
push eax
call fcn.0040d7fa
add esp, 0x10
test eax, eax
js 0x40ec38
lea ecx, [ebp - 0x210]
xor esi, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, si
jne 0x40ef3d
mov esi, dword [ebp - 0x234]
sub ecx, edx
sar ecx, 1
lea eax, [esi + 2]
lea eax, [eax + ecx*2]
cmp eax, dword [ebp - 0x21c]
ja 0x40f124
lea eax, [ecx*2 + 2]
push eax
lea eax, [ebp - 0x210]
push eax
mov eax, dword [ebp - 0x214]
add eax, esi
push eax
call sub.msvcrt.dll_memcpy
lea ecx, [ebp - 0x210]
add esp, 0xc
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, word [ebp - 0x224]
jne 0x40ef8d
sub ecx, edx
sar ecx, 1
add esi, 2
lea edx, [esi + ecx*2]
mov ecx, ebx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, word [ebp - 0x224]
jne 0x40efab
sub ecx, esi
add ebx, 2
mov esi, dword [ebp - 0x21c]
mov eax, edx
sar ecx, 1
lea ecx, [ebx + ecx*2]
mov ebx, dword [ebp - 0x220]
sub eax, ecx
add eax, ebx
add eax, edi
cmp eax, esi
jg 0x40f124
sub ebx, ecx
add ebx, edi
push ebx
mov ebx, dword [ebp - 0x214]
push ecx
lea eax, [edx + ebx]
push eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
push dword [ebp + 0xc]
push esi
push ebx
call fcn.0040e999
push dword [ebp - 0x238]
mov ebx, dword [ebp - 0x22c]
mov ecx, ebx
call fcn.0040e097
xor esi, esi
push esi
push dword [ebx + 0x14]
call dword [sym.imp.KERNEL32.dll_BeginUpdateResourceW]
push ebx
push 0x10
mov ecx, ebx
mov dword [ebx + 0x18], eax
call fcn.0040dea1
mov edi, eax
mov ecx, dword [edi + 0x10]
mov edx, dword [edi + 4]
sub ecx, edx
sar ecx, 2
test ecx, ecx
je 0x40f0d6
push ebx
push dword [edx + esi*4]
mov ecx, ebx
push 0x10
call fcn.0040def8
mov ebx, eax
xor eax, eax
mov edx, eax
mov dword [ebp - 0x224], eax
mov ecx, dword [ebx + 0x10]
mov eax, dword [ebx + 4]
sub ecx, eax
sar ecx, 1
je 0x40f0bc
mov byte [ebp - 0x215], 1
push dword [ebp - 0x21c]
movzx ecx, word [eax + edx*2]
push dword [ebp - 0x214]
mov eax, dword [edi + 4]
push ecx
push dword [eax + esi*4]
mov eax, dword [ebp - 0x22c]
push 0x10
push dword [eax + 0x18]
call dword [sym.imp.KERNEL32.dll_UpdateResourceW]
mov edx, dword [ebp - 0x224]
test eax, eax
mov eax, dword [ebx + 0x10]
setne byte [ebp - 0x217]
sub eax, dword [ebx + 4]
inc edx
sar eax, 1
cmp edx, eax
mov dword [ebp - 0x224], edx
mov eax, dword [ebx + 4]
jb 0x40f06f
mov eax, dword [edi + 0x10]
inc esi
mov edx, dword [edi + 4]
sub eax, edx
mov ebx, dword [ebp - 0x22c]
sar eax, 2
cmp esi, eax
jb 0x40f043
cmp dword [ebx + 4], 0
je 0x40f0ec
push dword [ebx + 4]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor esi, esi
mov dword [ebx + 4], esi
jmp 0x40f0ee
xor esi, esi
mov ecx, dword [ebx + 0x18]
call fcn.00418c17
test eax, eax
setne al
cmp byte [ebp - 0x215], 0
mov byte [ebp - 0x216], al
jne 0x40ec32
push 0x4048d8
push esi
push dword [ebx + 0x14]
call fcn.0040cff7
add esp, 0xc
jmp 0x40eb9a
push 0x404870
jmp 0x40ed3c
push 0x404870
xor eax, eax
push eax
push 0x402b04
call fcn.0040cff7
add esp, 0xc
jmp 0x40ec38
push 0x404870
push edx
jmp 0x40ed3f
push 0x404820
jmp 0x40ed3c
push 0x404674
xor eax, eax
push eax
push dword [ebp - 0x238]
push 1
call fcn.0040d047
add esp, 0x10
test ebx, ebx
je 0x40ec32
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x40ec32
mov esi, ecx
jmp 0x40ec38
mov esi, ebx
jmp 0x40ec38