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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4b5d0b
mov eax, dword fs:[0]
push eax
sub esp, 0x3c8
mov eax, dword [0x4d77ac]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x3d4], edx
test ecx, ecx
jne 0x479d4f
xor eax, eax
lea ecx, [ebp - 0xc8]
mov word [ebp - 0xc8], ax
mov edi, 0x4c02b8
mov eax, dword [0x4d8ac0]
test eax, eax
mov dword [ebp - 0xcc], ecx
cmovne edi, eax
mov esi, edi
lea edx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x4799c5
sub esi, edx
sar esi, 1
cmp esi, 0x3f
jl 0x4799fd
lea eax, [esi*2 + 2]
mov dword [ebp - 0xcc], 0
push eax
push 0
call fcn.0049395e
mov ecx, eax
add esp, 8
mov dword [ebp - 0xcc], ecx
push esi
push edi
push ecx
call fcn.00493f28
mov eax, dword [ebp - 0xcc]
xor ecx, ecx
add esp, 0xc
mov word [eax + esi*2], cx
mov dword [ebp - 4], ecx
mov eax, dword [0x4d8a30]
cmp word [eax], cx
jne 0x479ada
mov eax, dword [ebp + 8]
test eax, eax
je 0x479a38
push eax
lea ecx, [ebp - 0xcc]
call fcn.0048cbb0
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push dword [ebp - 0xcc]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x479a86
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xc8]
mov eax, dword [ebp - 0xcc]
cmp eax, ecx
je 0x479de4
push eax
call fcn.00493921
add esp, 4
jmp 0x479de4
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
test edi, edi
je 0x479a5d
push edi
mov dword [ebp - 0x3d0], 0
call fcn.00492db5
add esp, 4
mov ebx, eax
lea eax, [ebp - 0x3d0]
push 0
push eax
push edi
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x3d0], edi
je 0x479d26
push ebx
call fcn.00494b53
add esp, 4
jmp 0x479a5d
push eax
lea ecx, [ebp - 0xcc]
call fcn.0048cbb0
cmp byte [0x4db6ce], 0
je 0x479b00
mov esi, dword [0x4dc10c]
mov dword [ebp - 0x3bc], esi
jmp 0x479c4c
mov ebx, dword [ebp - 0xcc]
push 0x340
call fcn.00493a54
mov esi, eax
add esp, 4
test esi, esi
je 0x479b32
mov dword [esi], 0
mov dword [esi + 4], 0xffffffff
mov dword [esi + 0x134], 0xffffffff
jmp 0x479b34
xor esi, esi
cmp dword [esi], 0
jne 0x479c15
cmp dword [esi + 4], 0xffffffff
jne 0x479c15
lea edi, [esi + 0x138]
push edi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
add edi, 0xfffffffe
lea esp, [esp]
mov ax, word [edi + 2]
lea edi, [edi + 2]
test ax, ax
jne 0x479b60
mov eax, dword [0x4c0418]
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push ebx
mov dword [edi], eax
mov dword [ebp - 0x3bc], 0
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x3bc], eax
cmp eax, 0xffffffff
je 0x479bfd
push eax
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 1
push 0x1c
sete bl
call fcn.00493a54
mov edi, eax
add esp, 4
mov byte [edi], 1
mov byte [edi + 1], bl
mov ecx, dword [ebp - 0x3bc]
mov dword [edi + 4], ecx
mov byte [edi + 8], 0
mov dword [edi + 0xc], 0
test bl, bl
je 0x479bed
push 1
push 0
push 0
push dword [ebp - 0x3bc]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [edi + 0xc], eax
mov ecx, edi
call fcn.00491530
mov dword [esi], eax
mov eax, dword [0x4dc3c4]
jmp 0x479c1a
push esi
mov dword [0x4dc3c8], 0x200
call fcn.00493959
add esp, 4
jmp 0x479a5d
mov eax, 0x1000000
mov dword [0x4dc3c8], eax
test eax, eax
je 0x479c31
push esi
call fcn.00493959
add esp, 4
jmp 0x479a5d
push 8
call fcn.00493a54
add esp, 4
mov dword [ebp - 0x3bc], eax
mov dword [eax + 4], esi
mov esi, eax
mov dword [eax], 1
test esi, esi
je 0x479a5d
mov edx, dword [ebp + 8]
lea eax, [ebp - 0x3b4]
push eax
lea eax, [ebp - 0x3c4]
push eax
push ecx
mov ecx, esi
call fcn.00492bf0
add esp, 0xc
test eax, eax
jne 0x479a5d
mov edi, dword [ebp - 0x188]
test edi, edi
je 0x479a5d
push edi
call fcn.00492db5
add esp, 4
mov ebx, eax
cmp dword [esi], 1
je 0x479ca2
mov dword [0x4dc3c8], 0x80000
jmp 0x479cc3
push ecx
mov ecx, dword [esi + 4]
push edi
push ebx
push dword [ebp - 0x3c4]
call fcn.00492a60
mov dword [0x4dc3c8], eax
test eax, eax
je 0x479ce5
cmp eax, 0x600
je 0x479ce5
push ebx
call fcn.00494b53
add esp, 4
cmp byte [0x4db6ce], 0
jne 0x479a5d
mov ecx, esi
call fcn.00492d60
jmp 0x479a5d
cmp byte [0x4db6ce], 0
jne 0x479d26
cmp dword [esi], 1
je 0x479cff
mov dword [0x4dc3c8], 0x80000
jmp 0x479d26
mov esi, dword [esi + 4]
mov ecx, esi
call fcn.00492b10
push esi
mov dword [0x4dc3c8], eax
call fcn.00493959
mov eax, dword [ebp - 0x3bc]
add esp, 4
push eax
call fcn.00493959
add esp, 4
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xc8]
mov eax, dword [ebp - 0xcc]
cmp eax, ecx
je 0x479ddc
push eax
call fcn.00493921
add esp, 4
jmp 0x479ddc
mov eax, dword [0x4dc104]
test eax, eax
push ecx
push dword [ebp + 8]
cmove eax, dword [0x4dc108]
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov esi, eax
test esi, esi
je 0x479de4
mov ecx, dword [0x4dc104]
test ecx, ecx
push esi
cmove ecx, dword [0x4dc108]
push ecx
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0x3c4], eax
push esi
test eax, eax
jne 0x479d98
call dword [sym.imp.KERNEL32.dll_FreeResource]
jmp 0x479de4
mov eax, dword [0x4dc104]
test eax, eax
cmove eax, dword [0x4dc108]
push eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov edi, eax
test edi, edi
je 0x479de4
push edi
call fcn.00492db5
add esp, 4
mov ebx, eax
push edi
push dword [ebp - 0x3c4]
call dword [sym.imp.KERNEL32.dll_LockResource]
push eax
push ebx
call fcn.004985a0
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_FreeResource]
test ebx, ebx
jne 0x479e76
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x479e54
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
test edi, edi
je 0x479e54
push edi
mov dword [ebp - 0x3c8], 0
call fcn.00492db5
add esp, 4
mov ebx, eax
lea eax, [ebp - 0x3c8]
push 0
push eax
push edi
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x3c8], edi
je 0x479e72
push ebx
call fcn.00494b53
add esp, 4
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00493864
mov esp, ebp
pop ebp
ret
test ebx, ebx
je 0x479e54
lea eax, [edi + ebx]
mov dword [ebp - 0x174], 0
mov dword [ebp - 0xd8], eax
lea edx, [ebp - 0x3cc]
push ecx
lea eax, [ebp - 0x3bc]
mov dword [ebp - 0x164], 0
push eax
lea eax, [ebp - 0x3c4]
mov dword [ebp - 0xd4], ebx
push eax
lea ecx, [ebp - 0x184]
mov dword [ebp - 0xdc], ebx
call fcn.00483750
add esp, 0xc
mov edi, eax
mov dword [ebp - 0x3bc], edi
push ebx
call fcn.00494b53
add esp, 4
test edi, edi
je 0x479e54
push 0x2c
lea eax, [ebp - 0x40]
push 0
push eax
call fcn.0049c630
mov ecx, dword [ebp - 0x3cc]
add esp, 0xc
mov eax, dword [ebp - 0x3c4]
mov ebx, ecx
imul ebx, dword [ebp - 0x3c4]
neg eax
mov dword [ebp - 0x38], eax
push 0
push 0
mov dword [ebp - 0x40], 0x28
mov dword [ebp - 0x3c], ecx
mov dword [ebp - 0x34], 0x200001
mov dword [ebp - 0x30], 0
lea eax, [ebx*4]
mov byte [ebp - 0x3b5], 0
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x3c0]
push eax
push 0
lea eax, [ebp - 0x40]
mov dword [ebp - 0x3c0], 0
push eax
push 0
call dword [sym.imp.GDI32.dll_CreateDIBSection]
mov dword [ebp - 0x3c8], eax
test eax, eax
je 0x479e54
xor esi, esi
test ebx, ebx
jle 0x47a06c
lea esp, [esp]
mov eax, dword [ebp - 0x3c0]
mov cl, byte [edi + esi*4 + 3]
mov byte [eax + esi*4 + 3], cl
mov eax, dword [ebp - 0x3c0]
cmp byte [eax + esi*4 + 3], 0xff
lea edi, [eax + esi*4]
mov eax, dword [ebp - 0x3bc]
jae 0x479ffd
movzx ecx, byte [eax + esi*4 + 2]
movzx eax, byte [eax + esi*4 + 3]
imul ecx, eax
mov eax, 0x80808081
mov byte [ebp - 0x3b5], 1
mul ecx
shr edx, 7
mov byte [edi], dl
mov edi, dword [ebp - 0x3bc]
movzx eax, byte [edi + esi*4 + 3]
movzx ecx, byte [edi + esi*4 + 1]
imul ecx, eax
mov eax, 0x80808081
mul ecx
mov eax, dword [ebp - 0x3c0]
shr edx, 7
mov byte [eax + esi*4 + 1], dl
movzx eax, byte [edi + esi*4 + 3]
movzx ecx, byte [edi + esi*4]
imul ecx, eax
mov eax, 0x80808081
mul ecx
mov eax, dword [ebp - 0x3c0]
shr edx, 7
mov byte [eax + esi*4 + 2], dl
jmp 0x47a026
mov al, byte [eax + esi*4 + 2]
mov byte [edi], al
mov edi, dword [ebp - 0x3bc]
mov eax, dword [ebp - 0x3c0]
movzx ecx, byte [edi + esi*4 + 1]
mov byte [eax + esi*4 + 1], cl
mov eax, dword [ebp - 0x3c0]
movzx ecx, byte [edi + esi*4]
mov byte [eax + esi*4 + 2], cl
mov eax, dword [ebp - 0x3c0]
mov ecx, dword [ebp - 0x3d4]
cmp dword [eax + esi*4], ecx
jne 0x47a063
mov byte [eax + esi*4], 0
mov eax, dword [ebp - 0x3c0]
mov byte [ebp - 0x3b5], 1
mov byte [eax + esi*4 + 1], 0
mov eax, dword [ebp - 0x3c0]
mov byte [eax + esi*4 + 2], 0
mov eax, dword [ebp - 0x3c0]
mov byte [eax + esi*4 + 3], 0
inc esi
cmp esi, ebx
jl 0x479f70
push edi
call fcn.00493921
add esp, 4
push 0x98
call fcn.00493a54
mov ecx, eax
add esp, 4
test ecx, ecx
je 0x47a095
lea eax, [ecx + 0x14]
xor edx, edx
mov dword [ecx + 0x10], eax
mov word [eax], dx
jmp 0x47a097
xor ecx, ecx
mov eax, dword [ebp - 0x3c8]
mov dword [ecx], eax
mov eax, dword [ebp - 0x3cc]
mov dword [ecx + 4], eax
mov eax, dword [ebp - 0x3c4]
mov dword [ecx + 8], eax
mov al, byte [ebp - 0x3b5]
mov byte [ecx + 0xc], al
mov eax, ecx
jmp 0x479e56