Function at 0x40cfe0
Capabilities:
Extract resource via kernel32 functions
Link many functions at runtime
Read file via mapping

Disassembly:
mov eax, dword [esp + 8]
sub esp, 0x28
test eax, eax
je 0x40cff1
mov dword [eax], 0
mov ecx, dword [esp + 0x2c]
push ebx
push ebp
push esi
push edi
lea edx, [esp + 0x14]
call fcn.0040d770
test eax, eax
jne 0x40d010
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret 8
mov eax, dword [esp + 0x14]
mov ebx, dword [sym.imp.MSVCRT.dll_toupper]
mov dword [esp + 0x34], eax
mov edi, str._signature_
mov ebp, 0x7fed7fed
mov esi, 0xeeeeeeee
lea ecx, [ecx]
mov al, byte [edi]
test al, al
je 0x40d05e
movsx eax, al
push eax
inc edi
call ebx
mov edx, dword [0x42a3b4]
lea ecx, [esi + ebp]
imul esi, esi, 0x21
movsx eax, al
mov ebp, dword [edx + eax*4]
xor ebp, ecx
add esi, eax
add esp, 4
test edi, edi
lea esi, [esi + ebp + 3]
jne 0x40d030
mov ebx, 0x7fed7fed
mov edi, str._signature_
mov dword [esp + 0x3c], ebx
mov esi, 0xeeeeeeee
mov al, byte [edi]
test al, al
je 0x40d0a7
movsx eax, al
push eax
inc edi
call dword [sym.imp.MSVCRT.dll_toupper]
mov edx, dword [0x42a3b4]
lea ecx, [esi + ebx]
imul esi, esi, 0x21
movsx eax, al
mov ebx, dword [edx + eax*4 + 0x400]
xor ebx, ecx
add esi, eax
add esp, 4
test edi, edi
lea esi, [esi + ebx + 3]
jne 0x40d071
mov dword [esp + 0x3c], ebx
mov edi, str._signature_
mov ebx, 0x7fed7fed
mov esi, 0xeeeeeeee
lea ebx, [ebx]
mov al, byte [edi]
test al, al
je 0x40d0f6
movsx eax, al
push eax
inc edi
call dword [sym.imp.MSVCRT.dll_toupper]
mov edx, dword [0x42a3b4]
lea ecx, [esi + ebx]
imul esi, esi, 0x21
movsx eax, al
mov ebx, dword [edx + eax*4 + 0x800]
xor ebx, ecx
add esi, eax
add esp, 4
test edi, edi
lea esi, [esi + ebx + 3]
jne 0x40d0c0
mov ecx, dword [esp + 0x34]
mov eax, dword [ecx + 0x134]
mov eax, dword [eax + 0x18]
mov esi, dword [ecx + 0x13c]
lea edi, [eax - 1]
mov eax, edi
and eax, ebp
mov ecx, eax
shl ecx, 4
or edx, 0xffffffff
add ecx, esi
cmp dword [ecx + 0xc], edx
mov ebp, eax
mov dword [esp + 0x2c], edx
je 0x40d16d
mov edx, dword [ecx]
cmp edx, dword [esp + 0x3c]
jne 0x40d156
cmp dword [ecx + 4], ebx
jne 0x40d156
cmp dword [ecx + 0xc], 0xfffffffe
je 0x40d156
mov dx, word [ecx + 8]
test dx, dx
jne 0x40d156
cmp byte [ecx + 0xa], dl
je 0x40d171
test dx, dx
jne 0x40d156
mov dl, byte [ecx + 0xa]
test dl, dl
jne 0x40d156
mov dword [esp + 0x2c], eax
inc eax
and eax, edi
cmp eax, ebp
je 0x40d16d
mov ecx, eax
shl ecx, 4
mov edx, dword [ecx + esi + 0xc]
add ecx, esi
cmp edx, 0xffffffff
jne 0x40d125
mov eax, dword [esp + 0x2c]
cmp eax, 0xffffffff
jne 0x40d19a
mov eax, dword [esp + 0x40]
test eax, eax
je 0x40d184
mov dword [eax], 1
push 0x4dc
call fcn.0040b130
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x28
ret 8
xor esi, esi
push str.advapi32.dll
mov dword [esp + 0x40], esi
mov dword [esp + 0x1c], esi
mov dword [esp + 0x28], esi
mov dword [esp + 0x30], esi
mov dword [esp + 0x24], esi
mov dword [esp + 0x38], esi
mov dword [esp + 0x20], esi
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
cmp eax, esi
mov dword [esp + 0x10], eax
je 0x40d6a8
push esi
push 0x978
push str.c:projects_storm_sourceSFile.cpp
push 0x24
call fcn.00408660
mov edx, dword [esp + 0x10]
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.CryptAcquireContextA
mov edi, eax
push edx
mov dword [esp + 0x44], edi
call esi
test eax, eax
mov dword [edi], eax
je 0x40d6a8
mov eax, dword [esp + 0x10]
push str.CryptCreateHash
push eax
call esi
test eax, eax
mov ecx, edi
mov dword [ecx + 4], eax
je 0x40d6a8
mov edx, dword [esp + 0x10]
push str.CryptDestroyHash
push edx
call esi
test eax, eax
mov ecx, edi
mov dword [ecx + 8], eax
je 0x40d6a8
mov edx, dword [esp + 0x10]
push str.CryptDestroyKey
push edx
call esi
test eax, eax
mov ecx, edi
mov dword [ecx + 0xc], eax
je 0x40d6a8
mov edx, dword [esp + 0x10]
push str.CryptHashData
push edx
call esi
test eax, eax
mov ecx, edi
mov dword [ecx + 0x10], eax
je 0x40d6a8
mov edx, dword [esp + 0x10]
push str.CryptImportKey
push edx
call esi
test eax, eax
mov ecx, edi
mov dword [ecx + 0x14], eax
je 0x40d6a8
mov edx, dword [esp + 0x10]
push str.CryptReleaseContext
push edx
call esi
test eax, eax
mov ecx, edi
mov dword [ecx + 0x18], eax
je 0x40d6a8
mov edx, dword [esp + 0x10]
push str.CryptSignHashA
push edx
call esi
test eax, eax
mov ecx, edi
mov dword [ecx + 0x1c], eax
je 0x40d6a8
mov edx, dword [esp + 0x10]
push str.CryptVerifySignatureA
push edx
call esi
test eax, eax
mov ecx, edi
mov dword [ecx + 0x20], eax
je 0x40d6a8
push 0
push 1
push str.Microsoft_Base_Cryptographic_Provider_v1.0
push str.Blizzard_Storm
lea edx, [esp + 0x30]
push edx
mov esi, edi
call dword [esi]
test eax, eax
jne 0x40d303
push 8
push 1
push str.Microsoft_Base_Cryptographic_Provider_v1.0
push str.Blizzard_Storm
lea eax, [esp + 0x30]
push eax
call dword [esi]
test eax, eax
je 0x40d6a8
mov ecx, dword [esp + 0x14]
mov edx, dword [ecx + 0x10c]
push 0
push 0
push 0
push 0x8000002
push 0
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
test eax, eax
mov dword [esp + 0x2c], eax
je 0x40d6a8
push 0
push 0
push 0
push 4
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
test eax, eax
mov dword [esp + 0x1c], eax
je 0x40d6a8
mov ecx, dword [esp + 0x14]
mov ebx, dword [sym.imp.MSVCRT.dll_toupper]
mov dword [esp + 0x30], ecx
mov edi, str._signature_
mov ebp, 0x7fed7fed
mov esi, 0xeeeeeeee
mov al, byte [edi]
test al, al
je 0x40d393
movsx eax, al
push eax
inc edi
call ebx
mov ecx, dword [0x42a3b4]
lea edx, [esi + ebp]
imul esi, esi, 0x21
movsx eax, al
mov ebp, dword [ecx + eax*4]
xor ebp, edx
add esi, eax
add esp, 4
test edi, edi
lea esi, [esi + ebp + 3]
jne 0x40d365
mov dword [esp + 0x28], 0x7fed7fed
mov ebx, dword [esp + 0x28]
mov edi, str._signature_
mov esi, 0xeeeeeeee
lea esp, [esp]
mov al, byte [edi]
test al, al
je 0x40d3ea
movsx eax, al
push eax
inc edi
call dword [sym.imp.MSVCRT.dll_toupper]
mov ecx, dword [0x42a3b4]
lea edx, [esi + ebx]
imul esi, esi, 0x21
movsx eax, al
mov ebx, dword [ecx + eax*4 + 0x400]
xor ebx, edx
add esi, eax
add esp, 4
test edi, edi
mov dword [esp + 0x28], ebx
lea esi, [esi + ebx + 3]
jne 0x40d3b0
mov edi, str._signature_
mov ebx, 0x7fed7fed
mov esi, 0xeeeeeeee
lea esp, [esp]
mov al, byte [edi]
test al, al
je 0x40d436
movsx eax, al
push eax
inc edi
call dword [sym.imp.MSVCRT.dll_toupper]
mov ecx, dword [0x42a3b4]
lea edx, [esi + ebx]
imul esi, esi, 0x21
movsx eax, al
mov ebx, dword [ecx + eax*4 + 0x800]
xor ebx, edx
add esi, eax
add esp, 4
test edi, edi
lea esi, [esi + ebx + 3]
jne 0x40d400
mov ecx, dword [esp + 0x30]
mov edx, dword [ecx + 0x134]
mov eax, dword [edx + 0x18]
mov esi, dword [ecx + 0x13c]
lea edi, [eax - 1]
mov eax, edi
and eax, ebp
mov ecx, eax
shl ecx, 4
or edx, 0xffffffff
add ecx, esi
cmp dword [ecx + 0xc], edx
mov ebp, eax
mov dword [esp + 0x30], edx
je 0x40d4ad
mov edx, dword [ecx]
cmp edx, dword [esp + 0x28]
jne 0x40d496
cmp dword [ecx + 4], ebx
jne 0x40d496
cmp dword [ecx + 0xc], 0xfffffffe
je 0x40d496
mov dx, word [ecx + 8]
test dx, dx
jne 0x40d496
cmp byte [ecx + 0xa], dl
je 0x40d4b1
test dx, dx
jne 0x40d496
mov dl, byte [ecx + 0xa]
test dl, dl
jne 0x40d496
mov dword [esp + 0x30], eax
inc eax
and eax, edi
cmp eax, ebp
je 0x40d4ad
mov ecx, eax
shl ecx, 4
mov edx, dword [ecx + esi + 0xc]
add ecx, esi
cmp edx, 0xffffffff
jne 0x40d465
mov eax, dword [esp + 0x30]
cmp eax, 0xffffffff
je 0x40d6a8
mov ecx, dword [esp + 0x14]
mov edx, eax
call fcn.0040d750
mov esi, eax
test dword [esi + 0xc], 0x1ff00
jne 0x40d69a
cmp dword [esi + 8], 8
jbe 0x40d69a
mov eax, dword [esi]
test eax, eax
je 0x40d69a
mov edx, dword [esp + 0x1c]
mov eax, dword [eax + edx]
cmp eax, 1
mov dword [esp + 0x30], eax
jb 0x40d50f
mov eax, dword [esp + 0x40]
test eax, eax
je 0x40d6a8
mov dword [eax], 3
jmp 0x40d6a8
mov eax, dword [eax*8 + 0x41e588]
push str.256
push eax
call fcn.00410480
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov edi, eax
push edi
call fcn.00410480
push eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov ebp, eax
push ebp
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ebx, eax
test ebx, ebx
je 0x40d56c
lea ecx, [esp + 0x24]
push ecx
push 0
push 0
push edi
call fcn.00410480
push eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov edx, dword [esp + 0x2c]
mov edi, dword [esp + 0x48]
push eax
push ebx
push edx
call dword [edi + 0x14]
jmp 0x40d570
mov edi, dword [esp + 0x3c]
push ebp
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov eax, dword [esp + 0x24]
test eax, eax
je 0x40d6ac
mov ecx, dword [esp + 0x20]
lea eax, [esp + 0x18]
push eax
push 0
push 0
push 0x8003
push ecx
call dword [edi + 4]
test eax, eax
je 0x40d6a8
mov edx, dword [esp + 0x14]
mov eax, dword [edx + 0x12c]
mov ecx, dword [esi]
mov edx, dword [esp + 0x1c]
push 0
sub ecx, eax
push ecx
add eax, edx
push eax
mov eax, dword [esp + 0x24]
push eax
call dword [edi + 0x10]
test eax, eax
je 0x40d6a8
mov ecx, dword [esi + 8]
push 8
push 0x9ce
push str.c:projects_storm_sourceSFile.cpp
push ecx
call fcn.00408660
mov edx, dword [esi + 8]
push 0
mov ebx, eax
mov eax, dword [esp + 0x1c]
push edx
push ebx
push eax
call dword [edi + 0x10]
push 0
push 0x9d3
push str.c:projects_storm_sourceSFile.cpp
push ebx
mov ebp, eax
call fcn.004093e0
test ebp, ebp
je 0x40d6a8
mov ecx, dword [esp + 0x14]
mov edx, dword [ecx + 0x134]
mov eax, dword [edx + 8]
mov ecx, dword [ecx + 0x12c]
mov edx, dword [esi + 8]
mov ebx, dword [esi]
add ebx, edx
lea ebp, [eax + ecx]
cmp ebx, ebp
jae 0x40d648
sub eax, dword [esi]
sub eax, edx
push 0
add eax, ecx
mov ecx, dword [esp + 0x1c]
push eax
mov eax, dword [esp + 0x24]
add ebx, eax
push ebx
push ecx
call dword [edi + 0x10]
test eax, eax
je 0x40d6a8
mov edx, dword [esp + 0x24]
mov eax, dword [esi + 8]
mov ecx, dword [esi]
push 0
push 0
push edx
mov edx, dword [esp + 0x28]
sub eax, 8
push eax
lea eax, [ecx + edx + 8]
mov ecx, dword [esp + 0x28]
push eax
push ecx
call dword [edi + 0x20]
test eax, eax
mov eax, dword [esp + 0x40]
je 0x40d68e
test eax, eax
mov dword [esp + 0x34], 1
je 0x40d6a8
mov edx, dword [esp + 0x30]
mov ecx, dword [edx*8 + 0x41e58c]
mov dword [eax], ecx
jmp 0x40d6ac
test eax, eax
je 0x40d6a8
mov dword [eax], 2
jmp 0x40d6ac
mov eax, dword [esp + 0x40]
test eax, eax
je 0x40d6a8
mov dword [eax], 2
mov edi, dword [esp + 0x3c]
mov eax, dword [esp + 0x18]
test eax, eax
je 0x40d6b8
push eax
call dword [edi + 8]
mov eax, dword [esp + 0x24]
test eax, eax
je 0x40d6c4
push eax
call dword [edi + 0xc]
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x40d6d3
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x40d6e2
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x20]
test eax, eax
je 0x40d705
push 0
push eax
call dword [edi + 0x18]
push 0x10
push 1
push str.Microsoft_Base_Cryptographic_Provider_v1.0
push str.Blizzard_Storm
lea edx, [esp + 0x30]
push edx
call dword [edi]
test edi, edi
je 0x40d71b
push 0
push 0x9fc
push str.c:projects_storm_sourceSFile.cpp
push edi
call fcn.004093e0
mov eax, dword [esp + 0x10]
test eax, eax
je 0x40d72a
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov esi, dword [esp + 0x34]
test esi, esi
jne 0x40d73c
push 0x4dc
call fcn.0040b130
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret 8