Function at 0x412820
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x54e197
mov eax, dword fs:[0]
push eax
sub esp, 0x138
mov eax, dword [0x5ac1d0]
xor eax, esp
mov dword [esp + 0x130], eax
push ebx
push esi
push edi
mov eax, dword [0x5ac1d0]
xor eax, esp
push eax
lea eax, [esp + 0x148]
mov dword fs:[0], eax
mov esi, dword [ebp + 0x10]
mov eax, dword [ebp + 8]
xor ebx, ebx
mov dword [esp + 0x28], eax
mov dword [esp + 0x24], ecx
cmp esi, ebx
je 0x412934
xor edx, edx
mov eax, 0x20
nop
lea ecx, [eax + edx]
shr ecx, 1
mov edi, esi
shr edi, cl
test edi, edi
je 0x412891
mov edx, ecx
jmp 0x412893
mov eax, ecx
mov ecx, eax
sub ecx, edx
cmp ecx, 8
ja 0x412880
shr eax, 3
cmp eax, 2
jbe 0x412934
push 0x1d
mov esi, 0xf
push str.Mash:_output_legnth_too_large
lea ecx, [esp + 0x78]
mov dword [esp + 0x8c], esi
mov dword [esp + 0x88], ebx
mov byte [esp + 0x78], bl
call fcn.00403640
lea ecx, [esp + 0x44]
mov dword [esp + 0x150], ebx
call fcn.0051bba6
push 0xffffffffffffffff
mov byte [esp + 0x154], 1
push ebx
lea edx, [esp + 0x78]
push edx
lea ecx, [esp + 0x60]
mov dword [esp + 0x50], vtable.KM::Exception.0
mov dword [esp + 0x5c], 1
mov dword [esp + 0x74], esi
mov dword [esp + 0x70], ebx
mov byte [esp + 0x60], 0
call fcn.004033c0
push 0x5a0434
lea eax, [esp + 0x48]
mov byte [esp + 0x154], 0
push eax
mov dword [esp + 0x4c], vtable.KM::InvalidArgument.0
call fcn.0051fdd8
lea ecx, [esp + 0x20]
push ecx
lea ecx, [ebp + 0x10]
mov dword [esp + 0x24], 0x14
call fcn.00414300
mov esi, eax
add esp, 4
mov dword [esp + 0x3c], esi
cmp esi, 0xffffffff
jbe 0x41295c
call fcn.004072c0
cmp esi, ebx
jne 0x412966
mov dword [esp + 0x1c], ebx
jmp 0x412971
mov edi, esi
call fcn.00414a50
mov dword [esp + 0x1c], eax
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x40], edx
mov dword [esp + 0x150], 2
mov dword [esp + 0x30], esi
cmp esi, 0xffffffff
jbe 0x412992
call fcn.004072c0
cmp esi, ebx
jne 0x41299e
xor edi, edi
mov dword [esp + 0x18], edi
jmp 0x4129ab
mov edi, esi
call fcn.00414a50
mov dword [esp + 0x18], eax
mov edi, eax
mov dword [esp + 0x34], edi
lea eax, [esp + 0x8c]
push eax
mov byte [esp + 0x154], 3
call fcn.00412b90
mov byte [esp + 0x150], 4
cmp dword [ebp + 0x10], 0
jbe 0x412a3a
mov ecx, ebx
shr ecx, 8
push 2
lea edx, [esp + 0x18]
mov byte [esp + 0x18], cl
push edx
lea ecx, [esp + 0x94]
mov byte [esp + 0x1d], bl
call fcn.00418f10
mov eax, dword [ebp + 0xc]
mov ecx, dword [esp + 0x28]
push eax
push ecx
lea ecx, [esp + 0x94]
call fcn.00418f10
mov edx, dword [esp + 0x8c]
mov eax, dword [edx + 0x1c]
lea ecx, [esp + 0x8c]
call eax
mov edx, dword [esp + 0x8c]
push eax
mov eax, dword [edx + 0x38]
lea ecx, [edi + ebx]
push ecx
lea ecx, [esp + 0x94]
call eax
add ebx, 0x14
cmp ebx, dword [ebp + 0x10]
jb 0x4129d2
mov eax, dword [ebp + 0x14]
cmp eax, 1
jle 0x412ada
dec eax
mov dword [esp + 0x20], eax
jmp 0x412a50
mov ecx, dword [esp + 0x1c]
push esi
push edi
push ecx
call fcn.0051f970
add esp, 0xc
xor ebx, ebx
test esi, esi
je 0x412acc
mov edx, ebx
push 2
lea eax, [esp + 0x18]
shr edx, 8
push eax
lea ecx, [esp + 0x94]
mov byte [esp + 0x1c], dl
mov byte [esp + 0x1d], bl
call fcn.00418f10
mov ecx, dword [esp + 0x1c]
push esi
push ecx
lea ecx, [esp + 0x94]
call fcn.00418f10
mov edx, dword [esp + 0x8c]
mov eax, dword [edx + 0x1c]
lea ecx, [esp + 0x8c]
call eax
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x8c]
push eax
mov eax, dword [edx + 0x38]
add ecx, ebx
push ecx
lea ecx, [esp + 0x94]
call eax
add ebx, 0x14
cmp ebx, esi
jb 0x412a65
dec dword [esp + 0x20]
mov edi, dword [esp + 0x18]
jne 0x412a50
mov ecx, dword [ebp + 0x10]
mov edx, dword [esp + 0x24]
push ecx
push edi
push edx
call fcn.0051f970
mov eax, dword [esp + 0x144]
lea ecx, [esp + 0xf8]
add esp, 0xc
cmp eax, ecx
jne 0x412b17
mov ecx, dword [esp + 0x134]
mov edi, eax
xor eax, eax
mov byte [esp + 0x12d], 0
rep stosd dword es:[edi], eax
mov edi, dword [esp + 0x18]
mov eax, dword [esp + 0xe8]
lea edx, [esp + 0x9c]
cmp eax, edx
jne 0x412b42
mov ecx, dword [esp + 0xe4]
mov edi, eax
xor eax, eax
mov byte [esp + 0xdd], 0
rep stosd dword es:[edi], eax
mov edi, dword [esp + 0x18]
xor al, al
mov ecx, esi
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x18]
push eax
call fcn.0051c1b1
mov edx, dword [esp + 0x20]
mov edi, edx
xor al, al
mov ecx, esi
push edx
rep stosb byte es:[edi], al
call fcn.0051c1b1
add esp, 8
mov ecx, dword [esp + 0x148]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x130]
xor ecx, esp
call fcn.0051b5fb
mov esp, ebp
pop ebp
ret