Function at 0x4b54a0
Capabilities:
Get file size
Resolve function by parsing pe exports

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x540227
push eax
mov dword fs:[0], esp
sub esp, 0x1f0
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
xor ebx, ebx
push edi
mov dword [0x593658], ebx
call esi
mov dword [0x593660], eax
mov eax, dword [esp + 0x20c]
cmp eax, ebx
je 0x4b61d0
cmp dword [esp + 0x210], ebx
je 0x4b61d0
cmp dword [0x593664], ebx
jne 0x4b5510
mov dword [0x593658], 2
mov dword [0x59365c], 0x137b
jmp 0x4b61e4
mov ecx, 0xf
xor eax, eax
lea edi, [esp + 0xed]
mov byte [esp + 0xec], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0xec]
push 1
push eax
mov dword [esp + 0x6c], ebx
call fcn.004a2450
add esp, 8
test eax, eax
jne 0x4b555d
mov dword [0x593658], 7
mov dword [0x59365c], 0x1387
jmp 0x4b61e4
mov ecx, 0x13
xor eax, eax
lea edi, [esp + 0x130]
mov dword [esp + 0x12c], ebx
rep stosd dword es:[edi], eax
mov ecx, 0xd
lea edi, [esp + 0x98]
mov dword [esp + 0x94], ebx
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x54]
call fcn.0051a5b0
lea ecx, [esp + 0x4c]
mov dword [esp + 0x204], ebx
call fcn.0051a5b0
lea ecx, [esp + 0x24]
mov byte [esp + 0x204], 1
call fcn.0051a5b0
mov eax, dword [esp + 0x214]
mov byte [esp + 0x204], 2
cmp eax, ebx
mov dword [esp + 0x5c], ebx
je 0x4b55e9
lea ecx, [esp + 0x24]
push ecx
push eax
call fcn.004a8e50
add esp, 8
cmp eax, ebx
je 0x4b55e9
lea ecx, [esp + 0x24]
call fcn.0051aeb0
mov dword [esp + 0x5c], eax
cmp word [esp + 0x9e], bx
push ebp
mov dword [esp + 0x18], ebx
jne 0x4b6013
lea edx, [esp + 0x50]
push ebx
lea eax, [esp + 0x5c]
push edx
lea ecx, [esp + 0x138]
push eax
lea edx, [esp + 0xfc]
push ecx
push edx
call fcn.004a25a0
add esp, 0x14
test eax, eax
je 0x4b6033
mov ecx, 0xf
xor eax, eax
lea edi, [esp + 0x181]
mov byte [esp + 0x180], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x80]
lea ecx, [esp + 0x64]
push eax
lea edx, [esp + 0x60]
push ecx
push edx
mov edx, dword [esp + 0x153]
lea eax, [esp + 0x48]
push eax
mov eax, dword [esp + 0x15c]
lea ecx, [esp + 0x190]
push 0x40
and edx, 0xff
push ecx
mov ecx, dword [esp + 0x178]
push edx
push eax
push ecx
mov dword [esp + 0x80], ebx
mov dword [esp + 0x88], ebx
mov dword [esp + 0x60], ebx
mov dword [esp + 0xa4], ebx
call fcn.004a58b0
add esp, 0x24
cmp eax, ebx
mov dword [esp + 0x54], eax
je 0x4b6053
push eax
call fcn.004bded0
add esp, 4
cmp eax, ebx
mov dword [esp + 0x7c], eax
je 0x4b6073
mov edx, dword [esp + 0x54]
push edx
call fcn.004aaf10
mov ecx, dword [esp + 0x214]
add esp, 4
mov word [esp + 0xa0], ax
lea eax, [esp + 0x40]
push eax
push ecx
mov dword [esp + 0x48], ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edx, dword [esp + 0x214]
mov esi, eax
mov eax, dword [esp + 0x40]
xor ecx, ecx
xor edi, edi
mov ebp, eax
push eax
or edi, esi
or ebp, ecx
push esi
push edx
mov dword [esp + 0x9c], edi
mov dword [esp + 0xa0], ebp
call fcn.004bc080
add esp, 0xc
test eax, eax
je 0x4b6093
cmp ebp, ebx
ja 0x4b5732
cmp edi, 0x200
jbe 0x4b573c
mov dword [esp + 0x4c], 0x200
jmp 0x4b574c
cmp edi, 0x1000
mov dword [esp + 0x4c], edi
ja 0x4b60b7
mov ecx, dword [esp + 0x7c]
push 0x1000
mov eax, dword [ecx]
call dword [eax + 8]
mov ecx, dword [esp + 0xa0]
push eax
push ecx
mov dword [esp + 0x24], eax
call fcn.004aae50
push 0x1000
mov dword [esp + 0x28], eax
call fcn.00520a0a
mov edx, dword [esp + 0x28]
mov ebp, eax
push edx
mov dword [esp + 0x58], ebp
call fcn.00520a0a
add esp, 0x10
cmp ebp, ebx
mov dword [esp + 0x18], eax
je 0x4b614f
cmp eax, ebx
je 0x4b614f
mov ecx, 0x400
xor eax, eax
mov edi, ebp
mov dword [esp + 0x2c], ebp
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x1c]
mov edi, dword [esp + 0x18]
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
cmp dword [esp + 0x5c], ebx
je 0x4b57dc
mov eax, dword [esp + 0x114]
or al, 0x10
mov dword [esp + 0x114], eax
cmp dword [esp + 0x64], ebx
je 0x4b57f2
mov eax, dword [esp + 0x114]
or al, 0x20
mov dword [esp + 0x114], eax
mov edi, dword [esp + 0x210]
cmp edi, 0xffffffff
jne 0x4b581d
mov dword [0x593658], 1
mov dword [0x59365c], 0x26a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x593660], eax
mov ecx, dword [esp + 0x40]
xor eax, eax
xor edx, edx
or eax, esi
or ecx, edx
mov edx, eax
and edx, 0xfff
mov dword [esp + 0x138], ebx
mov esi, edx
mov dword [esp + 0x13c], ebx
or esi, ebx
mov dword [esp + 0xa8], eax
mov dword [esp + 0xac], ecx
je 0x4b5886
cmp ecx, ebx
ja 0x4b585e
cmp eax, 0x1000
jbe 0x4b5862
mov esi, ebx
jmp 0x4b5866
mov edx, eax
mov esi, ecx
mov ebp, eax
sub ebp, edx
mov edx, ecx
sbb edx, esi
add ebp, 0x1000
adc edx, ebx
mov dword [esp + 0xb0], ebp
mov dword [esp + 0xb4], edx
jmp 0x4b5894
mov dword [esp + 0xb0], eax
mov dword [esp + 0xb4], ecx
mov edx, dword [esp + 0x3c]
mov dword [esp + 0xb8], eax
mov eax, dword [esp + 0x54]
mov dword [esp + 0xbc], ecx
lea ecx, [esp + 0x168]
mov dword [esp + 0x164], eax
push ecx
lea eax, [esp + 0x184]
push edx
push eax
call fcn.004bb3b0
mov ecx, dword [esp + 0x8c]
add esp, 0xc
mov dword [esp + 0x17c], ecx
lea ecx, [esp + 0x28]
call fcn.0051a7b0
xor edx, edx
mov dword [esp + 0xc0], ebx
cmp edx, eax
mov dword [esp + 0xc8], ebx
sbb ecx, ecx
mov dword [esp + 0xcc], 0x1000
and ecx, eax
mov eax, dword [esp + 0x1c]
add ecx, 0x10ff
mov dword [esp + 0xc4], eax
shr ecx, 0xc
shl ecx, 0xc
mov dword [esp + 0x154], ecx
mov ecx, dword [esp + 0xa0]
push ecx
call fcn.004ac200
mov esi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
add esp, 4
mov word [esp + 0x9e], ax
push ebx
push ebx
push ebx
push edi
call esi
mov edi, dword [esp + 0x214]
push ebx
push ebx
push ebx
push edi
call esi
mov edx, dword [esp + 0x114]
push 1
or edx, 1
mov dword [esp + 0x118], edx
lea edx, [esp + 0xf4]
push edx
push edi
call fcn.004aa040
add esp, 0xc
test eax, eax
je 0x4b60db
mov ecx, 7
xor eax, eax
lea edi, [esp + 0xd1]
mov byte [esp + 0xd0], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0xd0]
test eax, eax
je 0x4b60f1
mov edi, dword [esp + 0x210]
lea ecx, [esp + 0x10]
push 1
push ecx
push ebx
push edi
mov dword [esp + 0x20], ebx
call esi
push ebx
push ebx
push ebx
push edi
mov ebp, eax
call esi
mov edx, dword [esp + 0x210]
xor edi, edi
push edx
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 1
jne 0x4b5a0e
mov edx, dword [esp + 0x210]
push ebx
lea eax, [esp + 0x24]
push ebx
push eax
lea ecx, [esp + 0xdc]
push 0x20
push ecx
push edx
mov dword [esp + 0x38], ebx
call fcn.004ba790
add esp, 0x18
test eax, eax
je 0x4b5a0e
cmp dword [esp + 0x20], 0x20
jne 0x4b5a0e
mov edi, 1
mov ecx, dword [esp + 0x210]
lea eax, [esp + 0x10]
push ebx
push eax
push ebp
push ecx
call esi
cmp edi, ebx
je 0x4b60f1
lea edx, [esp + 0xd0]
push edx
call fcn.004ad590
add esp, 4
test eax, eax
je 0x4b6107
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x593658], ebx
call edi
mov dword [0x593660], eax
mov eax, dword [0x593664]
cmp eax, ebx
jne 0x4b5a91
mov dword [0x593658], 2
mov dword [0x59365c], 0x27e
call edi
mov dword [0x593660], eax
mov dword [0x593658], 0x1f
mov dword [0x59365c], 0x1444
call edi
jmp 0x4b6169
cmp dword [0x593b8c], ebx
jne 0x4b5ae7
mov cl, byte [esp + 0xd6]
mov eax, dword [esp + 0xe0]
mov edx, dword [0x593670]
and ecx, 1
cmp eax, 0x2710
ja 0x4b5ac9
cmp edx, 0x2710
ja 0x4b5ae7
cmp edx, eax
je 0x4b5ae7
cmp eax, ebx
jne 0x4b5ad9
jmp 0x4b5ae7
cmp eax, edx
jne 0x4b5ad9
cmp dword [0x593678], ebx
ja 0x4b5ae7
cmp ecx, ebx
je 0x4b5ae7
push ecx
push eax
call fcn.004ad7f0
add esp, 8
cmp eax, ebx
je 0x4b5a76
mov ecx, 0xf
xor eax, eax
lea edi, [esp + 0x1c1]
mov byte [esp + 0x1c0], bl
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x214]
push ebx
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [esp + 0x158]
push ebx
push eax
push ecx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x48], ebx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x98], ebx
mov dword [esp + 0x84], 0x40
mov dword [esp + 0x7c], 1
mov dword [esp + 0x24], ebx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x40], ebx
xor ebp, ebp
mov dword [esp + 0x30], ebx
mov dword [esp + 0x9c], ebx
call esi
mov eax, dword [esp + 0x6c]
mov dword [esp + 0x14], ebx
cmp eax, ebx
je 0x4b5bf7
lea edx, [esp + 0x74]
lea eax, [esp + 0x1c0]
push edx
lea ecx, [esp + 0x8c]
push eax
lea edx, [esp + 0x1c]
push ecx
lea eax, [esp + 0x40]
push edx
lea ecx, [esp + 0x48]
push eax
mov eax, dword [esp + 0xa8]
push ecx
mov ecx, dword [esp + 0xa8]
lea edx, [esp + 0x3c]
push 0x200
push edx
mov edx, dword [esp + 0x230]
push eax
push ecx
push edx
push 1
mov dword [esp + 0x9c], ebx
call fcn.004b3fa0
add esp, 0x30
xor ecx, ecx
cmp eax, ebx
sete cl
mov ebp, ecx
cmp ebp, ebx
jne 0x4b5f17
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x4c]
cmp ecx, eax
ja 0x4b5df1
jae 0x4b5be6
mov dword [esp + 0x30], 1
cmp ecx, ebx
jbe 0x4b5cbf
mov esi, dword [esp + 0x38]
jmp 0x4b5ca9
mov esi, dword [esp + 0x4c]
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x210]
push ebx
lea eax, [esp + 0x18]
push ebx
push eax
push esi
push ecx
push edx
call fcn.004ba790
add esp, 0x18
test eax, eax
je 0x4b5e0a
mov ecx, dword [esp + 0x14]
cmp ecx, esi
jae 0x4b5c30
mov dword [esp + 0x30], 1
cmp ecx, ebx
jbe 0x4b5cbf
mov eax, dword [esp + 0x88]
push eax
call fcn.004bded0
add esp, 4
cmp eax, ebx
je 0x4b5e23
lea ecx, [esp + 0x84]
mov dword [esp + 0x84], ebx
push ecx
mov ecx, dword [esp + 0x38]
push 0x200
push ecx
mov ecx, dword [esp + 0x20]
mov edx, dword [eax]
push ecx
mov ecx, dword [esp + 0x34]
push ecx
mov ecx, dword [esp + 0x88]
push ecx
lea ecx, [esp + 0x1d8]
push ecx
mov ecx, eax
call dword [edx + 0x14]
cmp eax, ebx
je 0x4b5e3c
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x84]
cmp eax, ecx
jne 0x4b5e55
mov esi, dword [esp + 0x34]
mov edi, dword [esp + 0x2c]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x2c]
add eax, ecx
add edx, ecx
cmp eax, 0x1000
mov dword [esp + 0x10], eax
mov dword [esp + 0x2c], edx
jae 0x4b5ce4
cmp dword [esp + 0x30], ebx
je 0x4b5b54
lea eax, [esp + 0x8c]
lea ecx, [esp + 0x20]
push eax
lea edx, [esp + 0x74]
push ecx
lea eax, [esp + 0x24]
push edx
mov edx, dword [esp + 0x54]
lea ecx, [esp + 0x24]
push eax
mov eax, dword [esp + 0x4c]
push ecx
push 0x1000
push edx
mov edx, dword [esp + 0x98]
lea ecx, [esp + 0x19c]
push eax
mov eax, dword [esp + 0xc0]
push ecx
push edx
push eax
mov dword [esp + 0x9c], ebx
call fcn.004a2850
add esp, 0x2c
cmp eax, ebx
jne 0x4b5e6e
mov ecx, dword [esp + 0x70]
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0xa0]
push ecx
push edx
push eax
call fcn.004aaeb0
mov edx, dword [esp + 0x24]
lea ecx, [esp + 0x84]
mov esi, eax
mov eax, dword [esp + 0x220]
push ebx
push ecx
push esi
push edx
push eax
mov dword [esp + 0x98], ebx
call fcn.004ba890
add esp, 0x20
test eax, eax
je 0x4b5edd
cmp dword [esp + 0x78], esi
jb 0x4b5ef3
cmp dword [esp + 0xc0], ebx
jne 0x4b5d9f
mov dword [esp + 0xc4], esi
mov edi, dword [esp + 0xc0]
mov edx, dword [esp + 0x48]
inc edi
mov ecx, 0x400
mov dword [esp + 0xc0], edi
xor eax, eax
mov edi, edx
mov dword [esp + 0xc8], esi
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x1c]
mov edi, dword [esp + 0x18]
mov esi, ecx
mov dword [esp + 0x2c], edx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, esi
mov dword [esp + 0x10], ebx
and ecx, 3
rep stosb byte es:[edi], al
cmp dword [esp + 0x30], ebx
je 0x4b5b54
jmp 0x4b5f17
mov dword [0x593658], 0x20
mov dword [0x59365c], 0x1472
jmp 0x4b5f07
mov dword [0x593658], 0xd
mov dword [0x59365c], 0x1487
jmp 0x4b5f07
mov dword [0x593658], 0xc
mov dword [0x59365c], 0x1496
jmp 0x4b5f07
mov dword [0x593658], 0x12
mov dword [0x59365c], 0x149f
jmp 0x4b5f07
mov dword [0x593658], 0x12
mov dword [0x59365c], 0x14a6
jmp 0x4b5f07
jge 0x4b5ec7
push 0x583998
lea ecx, [esp + 0x14]
call fcn.0043b640
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x54]
push 0x14bf
push ecx
push edx
push eax
lea ecx, [esp + 0x20]
push str.Error:_Encrypt_Data_Failed__File__Algrithm_d__DataLen_lu_KeyLen_lu__LINE_d
push ecx
mov byte [esp + 0x220], 3
call fcn.0043ed60
mov edx, dword [esp + 0x28]
push edx
call fcn.004be460
add esp, 0x1c
lea ecx, [esp + 0x10]
mov byte [esp + 0x208], 2
call fcn.0043bde0
mov dword [0x593658], 0x11
mov dword [0x59365c], 0x14c3
jmp 0x4b5f07
mov dword [0x593658], 0xe
mov dword [0x59365c], 0x14ce
jmp 0x4b5f07
mov dword [0x593658], 0xe
mov dword [0x59365c], 0x14d6
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x593660], eax
mov ebp, 1
mov eax, dword [esp + 0x20]
cmp eax, ebx
je 0x4b5f2c
push eax
call fcn.00520a33
add esp, 4
mov dword [esp + 0x20], ebx
mov eax, dword [esp + 0x24]
cmp eax, ebx
je 0x4b5f41
push eax
call fcn.00520a33
add esp, 4
mov dword [esp + 0x24], ebx
mov eax, dword [esp + 0x38]
cmp eax, ebx
je 0x4b5f56
push eax
call fcn.00520a33
add esp, 4
mov dword [esp + 0x38], ebx
mov eax, dword [esp + 0x34]
cmp eax, ebx
je 0x4b5f6b
push eax
call fcn.00520a33
add esp, 4
mov dword [esp + 0x34], ebx
mov eax, dword [esp + 0x214]
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
cmp dword [esp + 0x30], ebx
je 0x4b616e
cmp ebp, ebx
jne 0x4b616e
mov ecx, dword [esp + 0x60]
lea edx, [esp + 0xf0]
push ecx
push edx
call fcn.004a94e0
add esp, 8
lea ecx, [esp + 0x44]
call fcn.0051a5b0
lea eax, [esp + 0x44]
lea ecx, [esp + 0x28]
push eax
lea edx, [esp + 0x54]
push ecx
lea eax, [esp + 0x60]
push edx
lea ecx, [esp + 0xa4]
push eax
lea edx, [esp + 0x140]
push ecx
mov ecx, dword [esp + 0x228]
lea eax, [esp + 0x104]
push edx
push eax
push ecx
mov byte [esp + 0x228], 4
call fcn.0049bd00
add esp, 0x20
test eax, eax
je 0x4b611d
lea ecx, [esp + 0x44]
mov dword [esp + 0x68], 1
mov byte [esp + 0x208], 2
call fcn.0051a710
jmp 0x4b616e
mov dword [0x593658], 1
mov dword [0x59365c], 0x13a2
call esi
mov dword [0x593660], eax
jmp 0x4b617f
mov dword [0x593658], 8
mov dword [0x59365c], 0x13a9
call esi
mov dword [0x593660], eax
jmp 0x4b617f
mov dword [0x593658], 0xb
mov dword [0x59365c], 0x13bf
call esi
mov dword [0x593660], eax
jmp 0x4b617f
mov dword [0x593658], 0xc
mov dword [0x59365c], 0x13c7
call esi
mov dword [0x593660], eax
jmp 0x4b617f
mov dword [0x593658], 0x25
mov dword [0x59365c], 0x13da
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x593660], eax
jmp 0x4b617f
mov dword [0x593658], 0x20
mov dword [0x59365c], 0x13e9
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x593660], eax
jmp 0x4b617f
mov dword [0x593658], 0x10
mov dword [0x59365c], 0x1424
jmp 0x4b6163
mov dword [0x593658], 0xf
mov dword [0x59365c], 0x1434
jmp 0x4b6163
mov dword [0x593658], 0x14
mov dword [0x59365c], 0x143d
jmp 0x4b6163
mov dword [0x593658], 0x10
mov dword [0x59365c], 0x1504
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [esp + 0x44]
mov dword [0x593660], eax
mov byte [esp + 0x208], 2
call fcn.0051a710
jmp 0x4b616e
mov dword [0x593658], 0x21
mov dword [0x59365c], 0x13f6
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x593660], eax
mov eax, dword [esp + 0x48]
cmp eax, ebx
je 0x4b617f
push eax
call fcn.00520a33
add esp, 4
mov eax, dword [esp + 0x18]
pop ebp
cmp eax, ebx
je 0x4b6195
push eax
call fcn.00520a33
add esp, 4
mov dword [esp + 0x14], ebx
lea ecx, [esp + 0x24]
mov byte [esp + 0x204], 1
call fcn.0051a710
lea ecx, [esp + 0x4c]
mov byte [esp + 0x204], bl
call fcn.0051a710
lea ecx, [esp + 0x54]
mov dword [esp + 0x204], 0xffffffff
call fcn.0051a710
mov eax, dword [esp + 0x64]
jmp 0x4b61f0
mov dword [0x593658], 1
mov dword [0x59365c], 0x1375
call esi
mov dword [0x593660], eax
mov eax, 1
mov ecx, dword [esp + 0x1fc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x1fc
ret