Function at 0x51e74df6
Capabilities:
Extract resource via kernel32 functions

Disassembly:
sub esp, 0x28
push ebx
mov ebx, dword [esp + 0x34]
push ebp
push esi
mov esi, edx
push edi
mov edx, dword [esp + 0x3c]
and ebx, 0xffff
push 0xda
add ebx, edx
xor edi, edi
push 1
mov dword [esp + 0x30], ecx
push esi
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x24], edi
xor ebp, ebp
call dword [sym.imp.KERNEL32.dll_FindResourceA]
test eax, eax
jne 0x51e74e3e
pop edi
pop esi
pop ebp
xor ax, ax
pop ebx
add esp, 0x28
ret 0x14
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x51e74e57
pop edi
pop esi
pop ebp
xor ax, ax
pop ebx
add esp, 0x28
ret 0x14
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
mov cl, byte [esp + 0x4c]
mov dword [esp + 0x2c], esi
mov al, cl
and al, 1
mov byte [esp + 0x13], al
je 0x51e74eb6
mov eax, dword [esp + 0x44]
test cl, 8
jne 0x51e74e84
add eax, 2
mov word [eax - 2], 0
cmp word [esp + 0x40], 0
jne 0x51e74e9e
pop edi
pop esi
mov word [eax], 0
pop ebp
xor ax, ax
pop ebx
add esp, 0x28
ret 0x14
mov ecx, dword [esp + 0x48]
and ecx, 0xffff
mov dword [esp + 0x14], ecx
lea ecx, [eax + ecx*2 - 2]
mov dword [esp + 0x1c], ecx
jmp 0x51e74f06
cmp word [esp + 0x40], 0
jne 0x51e74edb
mov eax, dword [esp + 0x44]
test cl, 4
mov byte [eax], 0
je 0x51e74ece
mov byte [eax + 1], 0
pop edi
pop esi
pop ebp
xor ax, ax
pop ebx
add esp, 0x28
ret 0x14
mov eax, dword [esp + 0x48]
lea edx, [esp + 0x18]
and eax, 0xffff
mov dword [esp + 0x14], eax
lea ebx, [eax + eax]
push ebx
push edx
call fcn.51e776f3
mov eax, dword [esp + 0x18]
lea ecx, [ebx + eax - 2]
mov ebx, dword [esp + 0x20]
mov dword [esp + 0x1c], ecx
mov ecx, dword [esp + 0x3c]
mov dword [esp + 0x34], eax
cmp ecx, ebx
jae 0x51e74ffe
cmp eax, dword [esp + 0x1c]
jae 0x51e74ffe
mov edi, dword [esp + 0x3c]
mov dword [esp + 0x24], 8
mov dl, byte [edi]
inc edi
mov byte [esp + 0x40], dl
mov dword [esp + 0x3c], edi
mov cl, byte [esp + 0x40]
shr cl, 7
movzx di, cl
mov ecx, ebp
mov ebp, edi
and ecx, 0xffff
and ebp, 0xffff
mov dword [esp + 0x30], edi
lea edx, [ecx + ecx*2]
lea edx, [ebp + edx*2]
mov dx, word [esi + edx*2]
test dx, dx
je 0x51e74f6a
mov ebp, edx
jmp 0x51e74fdb
lea ecx, [ecx + ecx*2]
lea esi, [esi + ecx*4 + 4]
xor ecx, ecx
mov edx, esi
cmp word [edx], cx
jne 0x51e74f81
mov ecx, 1
jmp 0x51e74f96
add edx, 2
cmp cx, 4
jae 0x51e74f96
mov di, word [edx]
inc ecx
add edx, 2
test di, di
jne 0x51e74f84
mov edx, ecx
and edx, 0xffff
lea edi, [eax + edx*2]
mov edx, dword [esp + 0x1c]
cmp edi, edx
jbe 0x51e74faf
mov ecx, edx
sub ecx, eax
sar ecx, 1
and ecx, 0xffff
mov edi, eax
shl ecx, 1
mov edx, ecx
mov ebx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
mov ebx, dword [esp + 0x20]
and ecx, 3
add eax, edx
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x2c]
mov edi, dword [esp + 0x30]
mov bp, word [esi + ebp*2]
mov dl, byte [esp + 0x40]
mov ecx, dword [esp + 0x24]
shl dl, 1
dec ecx
mov byte [esp + 0x40], dl
mov dword [esp + 0x24], ecx
jne 0x51e74f37
cmp dword [esp + 0x3c], ebx
jb 0x51e74f16
and ebp, 0xffff
and edi, 0xffff
lea ecx, [ebp + ebp*2]
lea edx, [edi + ecx*2]
cmp word [esi + edx*2], 0
jne 0x51e7507a
lea ecx, [ebp + ebp*2]
lea esi, [esi + ecx*4 + 4]
xor ecx, ecx
mov edx, esi
cmp word [edx], cx
jne 0x51e75030
mov ecx, 1
jmp 0x51e75045
add edx, 2
cmp cx, 4
jae 0x51e75045
mov di, word [edx]
inc ecx
add edx, 2
test di, di
jne 0x51e75033
mov edx, ecx
and edx, 0xffff
lea edi, [eax + edx*2]
mov edx, dword [esp + 0x1c]
cmp edi, edx
jbe 0x51e7505e
sub edx, eax
sar edx, 1
mov ecx, edx
and ecx, 0xffff
mov edi, eax
shl ecx, 1
mov edx, ecx
mov ebx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
add eax, edx
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x34]
sub eax, 2
cmp eax, ecx
jb 0x51e75092
cmp word [eax], 0
jne 0x51e75092
sub eax, 2
cmp eax, ecx
jae 0x51e75085
mov cl, byte [esp + 0x13]
add eax, 2
test cl, cl
je 0x51e750d7
mov cl, byte [esp + 0x4c]
mov word [eax], 0
test cl, 4
je 0x51e750c5
mov ecx, dword [esp + 0x44]
pop edi
sub eax, ecx
pop esi
sar eax, 1
dec eax
pop ebp
mov word [ecx], ax
pop ebx
movzx ax, al
add esp, 0x28
ret 0x14
mov edx, dword [esp + 0x44]
pop edi
sub eax, edx
pop esi
pop ebp
pop ebx
sar eax, 1
add esp, 0x28
ret 0x14
test byte [esp + 0x4c], 8
je 0x51e75117
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x44]
push ecx
mov ecx, dword [esp + 0x1c]
sub eax, ecx
push edx
sar eax, 1
push eax
mov eax, dword [esp + 0x34]
push ecx
push eax
call fcn.51e744a1
cmp word [esp + 0x48], 0
mov ebx, eax
je 0x51e7510d
cmp ebx, dword [esp + 0x14]
jne 0x51e7510d
dec ebx
mov ecx, dword [esp + 0x44]
mov byte [ebx + ecx], 0
jmp 0x51e75152
mov ecx, dword [esp + 0x44]
mov edx, dword [esp + 0x14]
inc ecx
push edx
mov edx, dword [esp + 0x2c]
push ecx
mov ecx, dword [esp + 0x20]
sub eax, ecx
sar eax, 1
push eax
push ecx
push edx
call fcn.51e744a1
cmp word [esp + 0x48], 0
mov ebx, eax
je 0x51e75147
cmp ebx, dword [esp + 0x14]
jne 0x51e75147
dec ebx
mov eax, dword [esp + 0x44]
mov byte [eax], bl
mov byte [ebx + eax + 1], 0
mov eax, dword [esp + 0x18]
push eax
call fcn.51e777ec
mov ax, bx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret 0x14