Function at 0x497200
Capabilities:
Extract resource via kernel32 functions
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x6766a0
mov eax, dword fs:[0]
push eax
sub esp, 0x3d8
push esi
push edi
lea edi, [ebp - 0x3e4]
mov ecx, 0xf6
mov eax, 0xcccccccc
rep stosd dword es:[edi], eax
mov eax, dword [0x730b1c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x18], 0
cmp dword [ebp + 0xc], 0
jne 0x49758d
call fcn.0047d850
push eax
lea ecx, [ebp - 0xa0]
call fcn.0048b610
mov dword [ebp - 4], 0
call fcn.0047d860
mov ecx, eax
call fcn.0048b820
movzx eax, al
test eax, eax
je 0x4973de
mov ecx, dword [ebp + 8]
push ecx
lea ecx, [ebp - 0xa0]
call fcn.0048c1f0
mov esi, esp
push 0
push 0x80
push 3
push 0
push 1
push accept
lea ecx, [ebp - 0xa0]
call fcn.0048ba90
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp esi, esp
call fcn.00611b50
mov dword [ebp - 0xa8], eax
cmp dword [ebp - 0xa8], 0xffffffff
jne 0x4972e8
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xa0]
call fcn.0048b700
jmp 0x4976ac
mov esi, esp
push 0
mov edx, dword [ebp - 0xa8]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp esi, esp
call fcn.00611b50
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x497336
mov esi, esp
mov eax, dword [ebp - 0xa8]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp esi, esp
call fcn.00611b50
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xa0]
call fcn.0048b700
jmp 0x4976ac
mov dword [ebp - 0xb0], 0
mov ecx, dword [ebp - 0x18]
push ecx
call fcn.00610910
add esp, 4
mov dword [ebp - 0x3bc], eax
mov edx, dword [ebp - 0x3bc]
mov dword [ebp - 0x14], edx
mov esi, esp
push 0
lea eax, [ebp - 0xb0]
push eax
mov ecx, dword [ebp - 0x18]
push ecx
mov edx, dword [ebp - 0x14]
push edx
mov eax, dword [ebp - 0xa8]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp esi, esp
call fcn.00611b50
mov esi, esp
mov ecx, dword [ebp - 0xa8]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp esi, esp
call fcn.00611b50
mov edx, dword [ebp - 0xb0]
cmp edx, dword [ebp - 0x18]
je 0x4973d9
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x3c0], eax
mov ecx, dword [ebp - 0x3c0]
push ecx
call fcn.00610850
add esp, 4
mov dword [ebp - 0x14], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xa0]
call fcn.0048b700
jmp 0x4976ac
jmp 0x497576
call fcn.0047d860
push eax
lea ecx, [ebp - 0xa0]
call fcn.0048c1b0
mov dword [ebp - 0xb8], 0
call fcn.0047d870
movzx edx, al
test edx, edx
je 0x497412
call fcn.0047d880
mov dword [ebp - 0xb8], eax
jmp 0x497430
push 2
push 0
lea ecx, [ebp - 0xa0]
call fcn.0048ba90
push eax
call fcn.004b2980
add esp, 0xc
mov dword [ebp - 0xb8], eax
cmp dword [ebp - 0xb8], 0
jne 0x497450
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xa0]
call fcn.0048b700
jmp 0x4976ac
lea eax, [ebp - 0x2ec]
push eax
lea ecx, [ebp - 0x2f8]
push ecx
push 1
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp - 0xb8]
push eax
call fcn.004b2d10
add esp, 0x14
test eax, eax
je 0x49748e
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xa0]
call fcn.0048b700
jmp 0x4976ac
mov ecx, dword [ebp - 0xc0]
mov dword [ebp - 0x18], ecx
cmp dword [ebp - 0x18], 0
jne 0x4974b4
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xa0]
call fcn.0048b700
jmp 0x4976ac
mov edx, dword [ebp - 0x18]
push edx
call fcn.00610910
add esp, 4
mov dword [ebp - 0x3c4], eax
mov eax, dword [ebp - 0x3c4]
mov dword [ebp - 0x14], eax
push 3
mov ecx, dword [ebp - 0x18]
push ecx
mov edx, dword [ebp - 0x14]
push edx
mov eax, dword [ebp - 0x2f8]
push eax
mov ecx, dword [ebp - 0xb8]
push ecx
call fcn.004b2e80
add esp, 0x14
mov dword [ebp - 0x300], eax
cmp dword [ebp - 0x300], 0
je 0x49755b
cmp dword [ebp - 0x300], 0x600
je 0x49755b
mov edx, dword [ebp - 0x14]
mov dword [ebp - 0x3c8], edx
mov eax, dword [ebp - 0x3c8]
push eax
call fcn.00610850
add esp, 4
mov dword [ebp - 0x14], 0
call fcn.0047d870
movzx ecx, al
test ecx, ecx
jne 0x497544
mov edx, dword [ebp - 0xb8]
push edx
call fcn.004b2f10
add esp, 4
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xa0]
call fcn.0048b700
jmp 0x4976ac
call fcn.0047d870
movzx eax, al
test eax, eax
jne 0x497576
mov ecx, dword [ebp - 0xb8]
push ecx
call fcn.004b2f10
add esp, 4
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xa0]
call fcn.0048b700
jmp 0x4976a4
push 0x67cf1c
mov edx, dword [ebp + 0xc]
push edx
call fcn.00640190
add esp, 8
test eax, eax
jne 0x4975ae
mov dword [ebp - 0x14], 1
jmp 0x4976a4
mov esi, esp
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.0047d830
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceW]
cmp esi, esp
call fcn.00611b50
mov dword [ebp - 0x304], eax
cmp dword [ebp - 0x304], 0
jne 0x4975df
jmp 0x4976ac
mov esi, esp
mov edx, dword [ebp - 0x304]
push edx
call fcn.0047d830
push eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp esi, esp
call fcn.00611b50
mov dword [ebp - 0x308], eax
cmp dword [ebp - 0x308], 0
jne 0x497625
mov esi, esp
mov eax, dword [ebp - 0x304]
push eax
call dword [sym.imp.KERNEL32.dll_FreeResource]
cmp esi, esp
call fcn.00611b50
jmp 0x4976ac
mov esi, esp
mov ecx, dword [ebp - 0x304]
push ecx
call fcn.0047d830
push eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
cmp esi, esp
call fcn.00611b50
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x49764c
jmp 0x4976ac
mov edx, dword [ebp - 0x18]
push edx
call fcn.00610910
add esp, 4
mov dword [ebp - 0x3cc], eax
mov eax, dword [ebp - 0x3cc]
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x18]
push ecx
mov esi, esp
mov edx, dword [ebp - 0x308]
push edx
call dword [sym.imp.KERNEL32.dll_LockResource]
cmp esi, esp
call fcn.00611b50
push eax
mov eax, dword [ebp - 0x14]
push eax
call fcn.00614e90
add esp, 0xc
mov esi, esp
mov ecx, dword [ebp - 0x304]
push ecx
call dword [sym.imp.KERNEL32.dll_FreeResource]
cmp esi, esp
call fcn.00611b50
xor edx, edx
jne 0x49724d
cmp dword [ebp - 0x14], 0
jne 0x4977be
mov esi, esp
push 0
push 0x80
push 3
push 0
push 1
push accept
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp esi, esp
call fcn.00611b50
mov dword [ebp - 0x30c], eax
cmp dword [ebp - 0x30c], 0xffffffff
jne 0x4976ef
jmp 0x4977be
mov esi, esp
push 0
mov ecx, dword [ebp - 0x30c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp esi, esp
call fcn.00611b50
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x49772b
mov esi, esp
mov edx, dword [ebp - 0x30c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp esi, esp
call fcn.00611b50
jmp 0x4977be
mov dword [ebp - 0x314], 0
mov eax, dword [ebp - 0x18]
push eax
call fcn.00610910
add esp, 4
mov dword [ebp - 0x3d0], eax
mov ecx, dword [ebp - 0x3d0]
mov dword [ebp - 0x14], ecx
mov esi, esp
push 0
lea edx, [ebp - 0x314]
push edx
mov eax, dword [ebp - 0x18]
push eax
mov ecx, dword [ebp - 0x14]
push ecx
mov edx, dword [ebp - 0x30c]
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp esi, esp
call fcn.00611b50
mov esi, esp
mov eax, dword [ebp - 0x30c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp esi, esp
call fcn.00611b50
mov ecx, dword [ebp - 0x314]
cmp ecx, dword [ebp - 0x18]
je 0x4977b7
mov edx, dword [ebp - 0x14]
mov dword [ebp - 0x3d4], edx
mov eax, dword [ebp - 0x3d4]
push eax
call fcn.00610850
add esp, 4
mov dword [ebp - 0x14], 0
jmp 0x4977be
cmp dword [ebp - 0x14], 0
jne 0x4977cb
xor eax, eax
jmp 0x497d21
mov dword [ebp - 0x31c], 0
mov dword [ebp - 0x324], 1
mov dword [ebp - 0x330], 1
cmp dword [ebp + 0xc], 0
je 0x497804
push 0x67cf2c
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.00640190
add esp, 8
test eax, eax
je 0x497859
push 4
lea edx, [ebp - 0x33c]
push edx
lea eax, [ebp - 0x330]
push eax
lea ecx, [ebp - 0x324]
push ecx
mov edx, dword [ebp - 0x18]
push edx
mov eax, dword [ebp - 0x14]
push eax
call fcn.004bbaa0
add esp, 0x18
mov dword [ebp - 0x31c], eax
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x3d8], ecx
mov edx, dword [ebp - 0x3d8]
push edx
call fcn.00610850
add esp, 4
cmp dword [ebp - 0x31c], 0
jne 0x497859
xor eax, eax
jmp 0x497d21
push 0x2c
push 0
lea eax, [ebp - 0x370]
push eax
call fcn.00614d30
add esp, 0xc
mov dword [ebp - 0x370], 0x28
mov ecx, dword [ebp - 0x324]
mov dword [ebp - 0x36c], ecx
mov edx, dword [ebp - 0x330]
neg edx
mov dword [ebp - 0x368], edx
mov eax, 1
mov word [ebp - 0x364], ax
mov ecx, 0x20
mov word [ebp - 0x362], cx
mov dword [ebp - 0x360], 0
mov edx, dword [ebp - 0x324]
imul edx, dword [ebp - 0x330]
shl edx, 2
mov dword [ebp - 0x35c], edx
mov byte [ebp - 0x375], 0
mov dword [ebp - 0x380], 0
mov esi, esp
push 0
push 0
lea eax, [ebp - 0x380]
push eax
push 0
lea ecx, [ebp - 0x370]
push ecx
push 0
call dword [sym.imp.GDI32.dll_CreateDIBSection]
cmp esi, esp
call fcn.00611b50
mov dword [ebp - 0x388], eax
cmp dword [ebp - 0x388], 0
jne 0x497914
xor eax, eax
jmp 0x497d21
mov byte [ebp - 0x390], 0
xor edx, edx
mov word [ebp - 0x38f], dx
mov byte [ebp - 0x38d], dl
cmp dword [ebp + 0xc], 0
je 0x497a3e
push 0x67cf3c
mov eax, dword [ebp + 0xc]
push eax
call fcn.00640190
add esp, 8
test eax, eax
jne 0x497a3e
mov dword [ebp - 0x39c], 0
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x3a4], ecx
mov edx, dword [ebp - 0x3a4]
movzx eax, word [edx]
cmp eax, 0x23
jne 0x49798a
mov esi, esp
mov ecx, dword [ebp - 0x3a4]
push ecx
call dword [sym.imp.USER32.dll_CharNextW]
cmp esi, esp
call fcn.00611b50
mov dword [ebp - 0x3a4], eax
push 0x10
lea edx, [ebp - 0x39c]
push edx
mov eax, dword [ebp - 0x3a4]
push eax
call fcn.00638660
add esp, 0xc
mov dword [ebp - 0x3ac], eax
lea ecx, [ebp - 0x3ac]
mov dword [ebp - 0x31c], ecx
mov edx, 1
imul eax, edx, 3
mov ecx, 1
imul edx, ecx, 3
mov ecx, dword [ebp - 0x31c]
mov al, byte [ecx + eax]
mov byte [ebp + edx - 0x390], al
mov ecx, 1
imul edx, ecx, 0
mov eax, 1
shl eax, 1
mov ecx, dword [ebp - 0x31c]
mov dl, byte [ecx + edx]
mov byte [ebp + eax - 0x390], dl
mov eax, 1
shl eax, 0
mov ecx, 1
shl ecx, 0
mov edx, dword [ebp - 0x31c]
mov al, byte [edx + eax]
mov byte [ebp + ecx - 0x390], al
mov ecx, 1
shl ecx, 1
mov edx, 1
imul eax, edx, 0
mov edx, dword [ebp - 0x31c]
mov cl, byte [edx + ecx]
mov byte [ebp + eax - 0x390], cl
lea edx, [ebp - 0x390]
mov dword [ebp - 0x31c], edx
mov dword [ebp - 0x3b4], 0
jmp 0x497a59
mov eax, dword [ebp - 0x3b4]
add eax, 1
mov dword [ebp - 0x3b4], eax
mov ecx, dword [ebp - 0x324]
imul ecx, dword [ebp - 0x330]
cmp dword [ebp - 0x3b4], ecx
jge 0x497c31
mov edx, dword [ebp - 0x3b4]
mov eax, dword [ebp - 0x380]
mov ecx, dword [ebp - 0x3b4]
mov esi, dword [ebp - 0x31c]
mov cl, byte [esi + ecx*4 + 3]
mov byte [eax + edx*4 + 3], cl
mov edx, dword [ebp - 0x3b4]
mov eax, dword [ebp - 0x380]
movzx ecx, byte [eax + edx*4 + 3]
cmp ecx, 0xff
jge 0x497b70
mov edx, dword [ebp - 0x3b4]
mov eax, dword [ebp - 0x31c]
movzx eax, byte [eax + edx*4 + 2]
mov ecx, dword [ebp - 0x3b4]
mov edx, dword [ebp - 0x31c]
movzx ecx, byte [edx + ecx*4 + 3]
imul eax, ecx
xor edx, edx
mov ecx, 0xff
div ecx
mov edx, dword [ebp - 0x3b4]
mov ecx, dword [ebp - 0x380]
mov byte [ecx + edx*4], al
mov edx, dword [ebp - 0x3b4]
mov eax, dword [ebp - 0x31c]
movzx eax, byte [eax + edx*4 + 1]
mov ecx, dword [ebp - 0x3b4]
mov edx, dword [ebp - 0x31c]
movzx ecx, byte [edx + ecx*4 + 3]
imul eax, ecx
xor edx, edx
mov ecx, 0xff
div ecx
mov edx, dword [ebp - 0x3b4]
mov ecx, dword [ebp - 0x380]
mov byte [ecx + edx*4 + 1], al
mov edx, dword [ebp - 0x3b4]
mov eax, dword [ebp - 0x31c]
movzx eax, byte [eax + edx*4]
mov ecx, dword [ebp - 0x3b4]
mov edx, dword [ebp - 0x31c]
movzx ecx, byte [edx + ecx*4 + 3]
imul eax, ecx
xor edx, edx
mov ecx, 0xff
div ecx
mov edx, dword [ebp - 0x3b4]
mov ecx, dword [ebp - 0x380]
mov byte [ecx + edx*4 + 2], al
mov byte [ebp - 0x375], 1
jmp 0x497bce
mov edx, dword [ebp - 0x3b4]
mov eax, dword [ebp - 0x380]
mov ecx, dword [ebp - 0x3b4]
mov esi, dword [ebp - 0x31c]
mov cl, byte [esi + ecx*4 + 2]
mov byte [eax + edx*4], cl
mov edx, dword [ebp - 0x3b4]
mov eax, dword [ebp - 0x380]
mov ecx, dword [ebp - 0x3b4]
mov esi, dword [ebp - 0x31c]
mov cl, byte [esi + ecx*4 + 1]
mov byte [eax + edx*4 + 1], cl
mov edx, dword [ebp - 0x3b4]
mov eax, dword [ebp - 0x380]
mov ecx, dword [ebp - 0x3b4]
mov esi, dword [ebp - 0x31c]
mov cl, byte [esi + ecx*4]
mov byte [eax + edx*4 + 2], cl
mov edx, dword [ebp - 0x3b4]
mov eax, dword [ebp - 0x380]
mov ecx, dword [eax + edx*4]
cmp ecx, dword [ebp + 0x10]
jne 0x497c2c
mov edx, dword [ebp - 0x3b4]
mov eax, dword [ebp - 0x380]
mov byte [eax + edx*4], 0
mov ecx, dword [ebp - 0x3b4]
mov edx, dword [ebp - 0x380]
mov byte [edx + ecx*4 + 1], 0
mov eax, dword [ebp - 0x3b4]
mov ecx, dword [ebp - 0x380]
mov byte [ecx + eax*4 + 2], 0
mov edx, dword [ebp - 0x3b4]
mov eax, dword [ebp - 0x380]
mov byte [eax + edx*4 + 3], 0
mov byte [ebp - 0x375], 1
jmp 0x497a4a
cmp dword [ebp + 0xc], 0
je 0x497c4c
push 0x67cf4c
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.00640190
add esp, 8
test eax, eax
je 0x497c5b
mov edx, dword [ebp - 0x31c]
push edx
call fcn.004bbdd0
add esp, 4
push 0xa0
call fcn.00610870
add esp, 4
mov dword [ebp - 0x3e0], eax
mov dword [ebp - 4], 1
cmp dword [ebp - 0x3e0], 0
je 0x497c91
mov ecx, dword [ebp - 0x3e0]
call fcn.0048a3a0
mov dword [ebp - 0x3e4], eax
jmp 0x497c9b
mov dword [ebp - 0x3e4], 0
mov eax, dword [ebp - 0x3e4]
mov dword [ebp - 0x3dc], eax
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x3dc]
mov dword [ebp - 0x3b8], ecx
mov edx, dword [ebp - 0x3b8]
mov eax, dword [ebp - 0x388]
mov dword [edx], eax
mov ecx, dword [ebp - 0x3b8]
mov edx, dword [ebp - 0x380]
mov dword [ecx + 4], edx
mov eax, dword [ebp - 0x3b8]
mov ecx, dword [ebp - 0x324]
mov dword [eax + 0xc], ecx
mov edx, dword [ebp - 0x3b8]
mov eax, dword [ebp - 0x330]
mov dword [edx + 0x10], eax
mov ecx, dword [ebp - 0x3b8]
mov dl, byte [ebp - 0x375]
mov byte [ecx + 0x14], dl
mov eax, dword [ebp - 0x3b8]
mov byte [eax + 0x15], 0
mov ecx, dword [ebp - 0x3b8]
mov dword [ecx + 8], 0
mov eax, dword [ebp - 0x3b8]
push edx
mov ecx, ebp
push eax
lea edx, [0x497d5c]
call fcn.00611af0
pop eax
pop edx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00610840
add esp, 0x3e4
cmp ebp, esp
call fcn.00611b50
mov esp, ebp
pop ebp
ret